Linux Shell Key Bindings

By default, bash (and zsh & fish too) is configured with line editing commands similar to those of Emacs. It can also be switched to a vi-style interface.

In vi mode, press Esc to switch to command mode and press i to switch to insert mode.

Move forward one characterCtrl fl
Move backward one characterCtrl bh
Move to start of lineCtrl a0
Move to end of lineCtrl e$
Move forward a wordAlt fw
Move backward a wordAlt bb
Cut (delete) to end of lineCtrl kd$
Cut (delete) to beginning of lineCtrl ud0
Cut (delete) to the start of the current wordAlt Deldb
Cut (delete) to the previous whitespaceCtrl w
Cut (delete) to the end of the current wordAlt ddw
Paste from bufferCtrl y
Move to next line in historyCtrl nj
Move to previous line in historyCtrl pk
Search backwards in historyCtrl r
Search forwards in historyCtrl s
Insert last command from history!!
Clear screenCtrl l
Activate in bashset -o emacs (Default)set -o vi
Activate in zshbindkey -e (Default)bindkey -v