Mac Terminal Shortcut Keys

Use these shortcuts to save time when using Terminal.

Work with windows and tabs

Action
Shortcut
New window
Command-N
New window with same command
Control-Command-N
New tab
Command-T
New tab with same command
Control-Command-T
Show or hide tab bar
Shift-Command-T
Show all tabs or exit tab overview
Shift-Command-Backslash (\)
New command
Shift-Command-N
New remote connection
Shift-Command-K
Show or hide Inspector
Command-I
Edit title
Shift-Command-I
Edit background color
Option-Command-I
Make fonts bigger
Command-Plus (+)
Make fonts smaller
Command-Minus (–)
Next window
Command-Grave Accent (`)
Previous window
Command-Shift-Tilde (~)
Next Tab
Control-Tab
Previous Tab
Control-Shift-Tab
Split window into two panes
Command-D
Close split pane
Shift-Command-D
Close tab
Command-W
Close window
Shift-Command-W
Close other tabs
Option-Command-W
Close all
Option-Shift-Command-W
Scroll to top
Command-Home
Scroll to bottom
Command-End
Page up
Command-Page Up
Page down
Command-Page Down
Line up
Option-Command-Page Up
Line down
Option-Command-Page Down

Select, find, and edit text

Action
Shortcut
Move to beginning of line
Control-A
Move to end of line
Control-E
Erase to beginning of line
Control-U
Erase to end of line
Control-K
Select a complete file path
Hold down the Shift and Command keys and double-click the path
Select a complete line of text
Triple-click the line
Select a word
Double-click the word
Select a URL
Hold down the Shift and Command keys and double-click the URL
Select a rectangular block
Hold down the Option key and drag to select text
Cut
Command-X
Copy
Command-C
Copy without background color
Control-Shift-Command-C
Copy plain text
Option-Shift-Command-C
Paste
Command-V
Paste the selection
Shift-Command-V
Paste escaped text
Control-Command-V
Paste escaped selection
Control-Shift-Command-V
Find
Command-F
Find next
Command-G
Find previous
Command-Shift-G
Find using the selected text
Command-E
Jump to the selected text
Command-J
Select all
Command-A
Open the character viewer
Control-Command-Space

Work with marks and bookmarks

Action
Shortcut
Mark
Command-U
Mark as bookmark
Option-Command-U
Unmark
Shift-Command-U
Mark line and send return
Command-Return
Send return without marking
Shift-Command-Return
Insert bookmark
Shift-Command-M
Insert bookmark with name
Option-Shift-Command-M
Jump to previous mark
Command-Up Arrow
Jump to next mark
Command-Down Arrow
Jump to previous bookmark
Option-Command-Up Arrow
Jump to next bookmark
Option-Command-Down Arrow
Clear to previous mark
Command-L
Clear to previous bookmark
Option-Command-L
Clear to start
Command-K
Select between marks
Shift-Command-A

Other shortcuts

Action
Shortcut
Enter or exit full screen
Control-Command-F
Show or hide colors
Shift-Command-C
Open Terminal preferences
Command-Comma (,)
Break
Typing Command-Period (.) is equivalent to entering Control-C on the command line
Print
Command-P
Soft reset terminal emulator state
Option-Command-R
Hard reset terminal emulator state
Control-Option-Command-R
Open a URL
Hold down the Command key and double-click the URL
Add the complete path to a file
Drag the file from the Finder into the Terminal window
Export text as
Command-S
Export selected text as
Shift-Command-S
Reverse search command history
Control-R
Toggle “Allow Mouse Reporting” option
Command-R
Toggle “Use Option as Meta Key” option
Command-Option-O
Show alternate screen
Option-Command-Page Down
Hide alternate screen
Option-Command-Page Up
Open man page for selection
Control-Shift-Command-Question Mark (?)
Search man page index for selection
Control-Option-Command-Slash (/)
Complete directory or file name
On a command line, type one or more characters, then press Tab
Display a list of possible directory or file name completions
On a command line, type one or more characters, then press Tab twice
Tab Autocompletion: If you are in your home directory, and you type cd Desk and then press the tab key, the command line will automatically complete the command to read cd Desktop! You can also use this if you find yourself mistyping folder names: tab autocompletion will always fill it incorrectly.


Comments