Terminal Keyboard Shortcuts
Command-line shortcuts for bash, zsh, PowerShell and Windows Terminal.
Terminal Keyboard Shortcuts — 10 shortcuts
Action
Windows
Mac
Cancel the running command
WindowsCtrl+C
Mac⌃ Control+C
Clear the terminal
WindowsCtrl+L
Mac⌘ Cmd+K
Search the command history
WindowsCtrl+R
Mac⌃ Control+R
Repeat the last command
Windows↑
Mac↑
Jump to the start of the line
WindowsCtrl+A
Mac⌃ Control+A
Delete to the end of the line
WindowsCtrl+K
Mac⌃ Control+K
Delete the word before the cursor
WindowsCtrl+W
Mac⌃ Control+W
Suspend the process
WindowsCtrl+Z
Mac⌃ Control+Z
Complete a file path
WindowsTab
MacTab
New terminal tab
WindowsCtrl+Shift+T
Mac⌘ Cmd+T
Frequently asked questions
What is the keyboard shortcut to cancel the running command in the terminal?
On Windows, press Ctrl + C. On Mac, press Control + C.
What is the keyboard shortcut to clear the terminal in the terminal?
On Windows, press Ctrl + L. On Mac, press Cmd + K.
What is the keyboard shortcut to search the command history in the terminal?
On Windows, press Ctrl + R. On Mac, press Control + R.
What is the keyboard shortcut to repeat the last command in the terminal?
On Windows, press Up. On Mac, press Up.
What is the keyboard shortcut to jump to the start of the line in the terminal?
On Windows, press Ctrl + A. On Mac, press Control + A.