Check out this list of must-know keyboard shortcuts for Terminal on Mac to zip around it quicker and work faster with your command line.
Note that in addition to going through the list below, you can see most keyboard shortcuts by clicking the menu items from the top menu bar with Terminal open on the screen.
The Terminal window and tabs
These keyboard shortcuts can help you navigate and take action with the Terminal window and tabs:
- Open a new window: Command + N
- Open a new window with the same command: Control + Command + N
- Open a new tab: Command + T
- Open a new tab with the same command: Control + Command + T
- Show the tab bar: Shift + Command + T
- Show tab overview: Shift + Command + \ (backslash)
- Show Inspector: Command + I (capital letter “i”)
- Next window: Command + ` (grave accent)
- Previous window: Command + Shift + ~ (tilde)
- Next tab: Control + Tab
- Previous tab: Control + Shift + Tab
- Close tab or window: Command + W
- Close other tabs or windows: Option + Command + W
- Close the window (when you have more than one tab): Shift + Command + W
- Close all windows (when you have more than one tab in a window): Option + Shift + Command + W
Navigating within the window and tabs
- Scroll to the top: Command + Home (Fn + Left Arrow)
- Scroll to the bottom: Command + End (Fn + Right Arrow)
- Page up: Command + Page Up (Fn + Up Arrow)
- Page down: Command + Page Down (Fn + Down Arrow)
- Line up: Option + Command + Page Up (Fn + Up Arrow)
- Line down: Option + Command + Page Down (Fn + Down Arrow)
Command line shortcuts
Work with your command lines easier with these shortcuts:
- New command: Shift + Command + N
- Move the insertion point: Option + Move the pointer
- Move the insertion point to start of the line: Control + A
- Move the insertion point to the end of the line: Control + E
- Move the insertion point forward: Right Arrow
- Move the insertion point backward: Left Arrow
- Move the insertion point forward one word: Option + Right Arrow
- Move the insertion point backward one word: Option + Left Arrow
- Delete to the start of the line: Control + U
- Delete to the end of the line: Control + K
- Delete a character: Delete
- Delete forward one character: Fn + Delete
- Delete forward one word: Option + D
- Delete backward one word: Control + W
Text keyboard shortcuts
Select or find text in the Terminal window with these keyboard shortcuts:
- Select a word: Double-click the word
- Select a line of text: Triple-click the line
- Select a file path or URL: Shift + Command + Double-click the file path or URL
- Select all: Command + A
- Cut: Command + X
- Copy: Command + C
- Paste: Command + V
- Find: Command + F
- Find next: Command + G
- Find previous: Command + Shift + G
- Find with selected text: Command + E
- Move to selected text: Command + J
- Export text as: Command + S
- Export selected text as: Shift + Command + S
Mark and bookmark shortcuts
Mark and unmark, insert bookmarks, clear, and more with these shortcuts:
- Mark: Command + U
- Mark a bookmark: Option + Command + U
- Unmark: Shift + Command + U
- Mark line and return: Command + Return
- Return without marking: Shift + Command + Return
- Insert bookmark: Shift + Command + M
- Insert bookmark with name: Option + Shift + Command + M
- Move to the next mark: Command + Down Arrow
- Move to the previous mark: Command + Up Arrow
- Move to next bookmark: Option + Command + Down Arrow
- Move to previous bookmark: Option + Command + Up Arrow
- Clear to the previous mark: Command + L
- Clear to the previous bookmark: Option + Command + L
- Clear to the start: Command + K
Hopefully, these keyboard shortcuts for Terminal on your Mac will help you increase your productivity. And for more, take a look at these shortcuts for Messages or these for Notes on Mac.
More on Terminal: