Frequently Asked Question
What is GNU readline and what keybindings does it provide?
Readline is the GNU library that bash, gdb, the Python REPL, psql, and many other programs use to provide a command-line editor: cursor movement, history recall, kill and yank, search, and tab completion. When you press Ctrl+A to jump to the start of the line or Ctrl+R to search history, you're talking to readline, not to bash directly.
The default keybindings follow Emacs: Ctrl+A (start of line), Ctrl+E (end of line),
Ctrl+B / Ctrl+F (back / forward one character), Alt+B / Alt+F (back / forward one
word), Ctrl+W (delete word), Ctrl+U (delete to start of line), Ctrl+K (delete to
end of line), Ctrl+Y (yank). Readline also has a vi mode, switched on with set -o vi in bash. You can rebind any key by editing ~/.inputrc; for instance,
"\e[A": history-search-backward makes the up arrow search history by what you've
already typed.