When typing my password in a console I sometimes notice I did not write it properly. In these cases, I normally use Ctrl + u to reset and start from scratch.However, there are cases in which I know I typed everything fine but the first letter. Is there a way to go to the beginning of the word and replace it?The underlying problem is that I don't know which editor is being run when you type a password. I don't know if I can use vim expressions and/or the buttons Home in my keyboard.I do see that Backspace does work, but Home does not, neither the arrows . Using  Ctrl-a as indicated in Shell: how to go to the beginning of line when you are inside a screen? does not work either.I am on GNU bash, version 4.3.11.
How to go to the beginning of the password when typing it?
bash;command line
Control-a is readline keybinding that bash uses by default.  Other programs such as sudo or su apparently don't use it (might look into the their source code to learn how they handle input).  But you can always simulate readline with a program called rlwrap.  For example:$ rlwrap  sudo echo hiPassword: ********Now * are shown so you know where the pointer is and you can press Control-a to go to the beginning of the line.