Terminal shortcuts

March 31, 2025

The most useful shortcuts for navigating and editing text in terminal.

KeybindingAction
Alt + f/bMove cursor forward/backward one word
Ctrl + f/bMove forward/backward one character
Ctrl + a/eMove cursor to beginning/end of line
Ctrl + xxAlternates the cursor with its old position

Editing

KeybindingAction
Alt + dDelete next word
Alt + DelDelete previous word
Ctrl + wDelete previous word
Ctrl + dDelete character under cursor
Ctrl + xuIncremental undo
Ctrl + xeEdit in the $EDITOR program
Ctrl + xvEdit in vi mode
Ctrl + x + Ctrl + *Expand * to all items in the current directory