Common Readline Shortcuts

Readline Shortcut

GNU Readline is a software library that provides in-line editing and history capabilities for interactive programs with a command-line interface, such as Bash and IPython.

man readline or readline

Moving


ShortcutCommentChinese Comment
Ctrl+AMove to the start of the current line
Ctrl+EMove to the end of the line
Ctrl+F / Move forward a character
Ctrl+B / Move backward a character
Alt+FMove forward one word
Alt+BMove backward one word
Ctrl+LClear screen

Copy and Paste (Killing and Yianking)


ShortcutCommentChinese Comment
Ctrl+KCut text to the end of line
Ctrl+UCut text to the beginning of lineCut to the beginning of the line
Alt+DCut text to the end of the current wordCut to the end of the word
Ctrl+WCut the word behind point, using white space as a word boundaryCut to the beginning of the word
Ctrl+YYank the top of the kill ring into the buffer at pointPaste the clipboard contents
Alt+YRotate the kill-ring, and yank the new top. If the prior command is yank or yank-popCycle through the clipboard

Changing Text


ShortcutCommentChinese Comment
Ctrl+DDelete the character at pointDelete the character at the cursor
Ctrl+HDelete previous characterDelete previous character
Ctrl+TTranspose charactersTranspose characters forward
Meta+TTranspose wordsTranspose words forward
Alt+UUppercase the current word
Alt+LLowercase the current word
Alt+CCapitalize the current word

History


ShortcutCommentChinese comment
Ctrl+RSearch backwards in history
Ctrl+SSearch forwards in history
Alt+.Insert the last argument of the previous command
Alt+ number + .With an argument n, insert the nth word from the previous command.
Lastmod: Wednesday, August 6, 2025

See Also:

Translations: