You are here

bash cheat sheet - moving the cursor

if you are here, that means you already know some basic bash tricks.

like tab for auto-completion and the up and down keys to view previous commands in the bash history. i have collected from the internet some other key combinations

Moving the cursor:

Ctrl + a
Go to the beginning of the line (Home)
Ctrl + e
Go to the End of the line (End)
Ctrl + p
Previous command (Up arrow)
Ctrl + n
Next command (Down arrow)
Alt + b
Back (left) one word
Alt + f
Forward (right) one word
Ctrl + f
Forward one character
Ctrl + b
Backward one character
Ctrl + xx
Toggle between the start of line and current cursor position