Keyboard shortcut to jump cursor to prompt

command linekeyboard shortcuts

I often mistype a command. So I will type this

sublimetext myfile.txt

instead of

git add myfile.txt

When I do this, I hit up to restore the last command. But after doing so, my cursor is at the end of the previously typed line. Is there a keyboard short cut to jump back to the prompt?

Best Answer

On bash command line, I use ctrl+a to go to the beginning of command and ctrl+e to go to the end of command.