Skip to main content

Terminal Shortcuts

The following shortcuts work in terminals such as Bash, Zsh, and Fish. The <C- syntax means Ctrl + key.

ShortcutPurpose
TabAutocomplete
<C-c>Break process and terminate current program
<C-z>Suspend program and return focus to shell
<C-d>Logout / close SSH connection
<C-l>Clear terminal screen
<C-a>Move cursor to the beginning of line
<C-e>Move cursor to the end of the line
<C-u>Delete text from current cursor to beginning of line
<C-k>Delete text from current cursor to end of line
<C-w>Delete word preceding current cursor position
<C-y>Paste any deleted text from other <C- commands
<C-p>View previous command
<C-n>View next command