Kevin Warrington

Loading clever subtitle...

Moving on the Command Line

Moving along the command line will be a breeze, if you know the following shortcuts.

ctrl+a - move to start of line
ctrl+e - move to end of line
alt+b - move backwards a word
alt+f - move forwards a word
alt+del - remove word
ctrl+k - remove to end of line

On Mac, make sure you setup the following config in Terminal > Preferences > Keyboard:

  • use option as meta key is checked
  • option cursor left is set to \033b
  • option cursor right is set to \033f

where \033 = esc

Comments