Logo ← PostgreSQL Blog

List of default (Emacs style) bash keyboard shortcuts


List of default (Emacs style) bash keyboard shortcuts

ctrl+c = cancels the current command
ctrl+d = closes the current terminal
ctrl+a Go to the beginning of the line
ctrl+e Go to the end of the line
alt+b Move cursor one word back
ctrl+b Move cursor one character back
alt+f Move cursor one word forward
ctrl+f Move cursor one character forward
alt+t Swap last two words
ctrl+t Swap last two characters
alt+r If you’ve modified command from history, reset changes
ctrl+k Delete all after cursor
ctrl+u Delete all before cursor
ctrl+w Delete last word
ctrl+y Paste deleted words (works as undo for ctrl+w)
ctrl+l Clear past terminal output (same as clear command)
ctrl+z Background running process