Command line keyboard shortcuts

Cycle through earlier commands

[Up Arrow]

Clear the terminal screen (Mac OSX)

CMD + k

Move cursor to beginning / end of line (a: beginning / alphabet, e: end)

CTRL + a
CTRL + e

Move cursor back / forward one character (b: back, f: forward)

CTRL + b
CTRL + f

Move cursor back / forward one word

OPTION + b
OPTION + f

OPTION + ←
OPTION + →

Delete character / word to left / right of the cursor

DEL
OPTION + DEL

CTRL + d
OPTION + d

Delete all text to end of line

Load interactive prompt to search earlier commands

Exit interactive prompt mode

Last updated