Skip to main content
IB

Bash/Shell keyboard shortcuts

There are many small habits that can make your command-line work safer and more predictable. To see the full list, see Bash Keyboard Shortcuts.

Keyboard shortcuts:

Ctrl + l to clear the terminal screen.

Ctrl + r to search through the command history.

Ctrl + a to move the cursor to the beginning of the line.

Ctrl + e to move the cursor to the end of the line.

Ctrl + u to cut the entire line.

Ctrl + k to delete from the cursor to the end of the line (cut from cut/paste)

Ctrl + w to delete the word before the cursor (cut from cut/paste)

Ctrl + y to paste the last cut text (paste from cut/paste)

Alt + b to move the cursor backward by one word.

Alt + f to move the cursor forward by one word.

Ctrl + _ to undo the last change. You'll need Shift + Ctrl + - on some terminals.