Tools / Keyboard Shortcuts / Terminal and Bash (readline)

Terminal and Bash (readline) Keyboard Shortcuts

12 keyboard shortcuts for Windows and Mac, grouped by task. Bash and other readline shells. On macOS, Option keys need Option as Meta..

Terminal and Bash (readline)

Bash and other readline shells. On macOS, Option keys need Option as Meta.

Line editing

ActionWindowsMacSave or copy
Start, end of lineCtrl+A / Ctrl+ECtrl+A / Ctrl+E
Back, forward one wordAlt+B / Alt+FOption+B / Option+F
Delete to end of lineCtrl+KCtrl+K
Delete to start of lineCtrl+UCtrl+U
Delete previous wordCtrl+WCtrl+W
Paste what you deletedCtrl+YCtrl+Y
Clear the screenCtrl+LCtrl+L
Search historyCtrl+RCtrl+R
Cancel the commandCtrl+CCtrl+C
End of input or exitCtrl+DCtrl+D
Suspend the jobCtrl+ZCtrl+Z
Run the last command again!! then Enter!! then Return

More developer

Checked 2 Dec 2026. Product names belong to their owners; this is an independent guide.

How to use it

  1. Search by what you want to do, like "new tab" or "bold".
  2. Switch between Windows and Mac keys, or show both.
  3. Save the ones you use and print a cheat sheet for one app.

Questions

Are these shortcuts up to date?

We checked them on 2 Dec 2026 against current versions of each app. Apps change shortcuts from time to time, and many apps show their own list (often with Ctrl+/ or ?).

What do Cmd and Option mean?

On a Mac keyboard, Cmd is the Command key and Option is the Alt key. Ctrl is the Control key on both Windows and Mac.

Can I print a cheat sheet?

Yes. Pick one app and press Print cheat sheet. The page prints only the shortcuts, sized for paper.