Keyboard Shortcuts in Terminal on Mac

Keyboard Shortcuts in Terminal on Mac

This post provides a quick reference to the keyboard shortcuts for the Terminal application on Mac.

This post provides a quick reference to the keyboard shortcuts for the Terminal application on Mac. The Terminal application is a Mac command-line interface. This is one of the most important applications a developer should know how to use. It allows you to control your Mac using a command prompt by issuing different types commands depending on the applications, utilities and other libraries on your Mac.

These commands were written and tested on the Terminal Application Version 2.10 (433).

Mac Keyboard Keys

The following set of keyboard symbols is used as part of the definition of the keyboard shortcuts. Not all the keyboard symbols can be found on your Mac keyboard and is a combination of other keys.

Keyboard SymbolDescriptionKeyboard SymbolDescription
The Command (⌘) KeyThe Backtab (⇤) Key
The Shift (⇧) KeyThe Return (↩) Key
The Option (⌥) KeyThe Enter (⌤) Key
The Control (^) Key (ctrl)The Delete (⌫) Key
fnThe Function (fn) KeyThe Forward Delete (⌦) Key
The Caps Lock (⇪) KeyThe Page Up (⇞) Key
The Left Arrow (←) KeyThe Page Down (⇟) Key
The Right Arrow (→) KeyThe Home (↖) Key
The Up Arrow (↑) KeyThe End (↘) Key
The Down Arrow (↓) KeyThe Space (␣) Key
The Tab (⇥) KeyThe Escape (⎋) Key

Mac Keyboard Keys

Some of the keys cannot be located on the keyboard, and the fn key is used in combination with other keys.

Keyboard SymbolDescriptionKeyboard SymbolDescription
Page Up Key: Fn + up arrowForward Delete Key: Fn + delete
Page Down Key: Fn + down arrowBacktab Key: Fn + tab
Home Key: Fn + left arrowEnter Key: Fn + return
End Key: Fn + right arrow  

Alternative Mac Keyboard Keys

Windows & Tabs Keys

The following set of keyboard shortcuts are related to the terminal window and the multiple tabs within the terminal window.

ShortcutKeyboard ShortcutDescription
Command-N⌘ + NNew Window
Control-Command-N⌃ + ⌘ + NNew Window with Same Command
Command-T⌘ + TNew Tab
Control-Command-T⌃ + ⌘ + TNew Tab with Same Command
Shift-Command-T⇧ + ⌘ + TShow Tab Bar / Hide Tab Bar
Shift-Command-Backslash⇧ + ⌘ + \Show All Tabs / Exit Tab Overview
Shift-Command-N⇧ + ⌘ + NNew Command
Shift-Command-K⇧ + ⌘ + KNew Remote Connection
Command-I⌘ + IShow Inspector / Hide Inspector
Shift-Command-I⇧ + ⌘ + IEdit Title
Option-Command-I⌥ + ⌘ + IEdit Background Colour
Command-Zero (0)⌘ + 0Default Font Size
Command-Plus (+)⌘ + +Make Fonts Bigger
Command-Minus (–)⌘ + -Make Fonts Smaller
Command-Shift-Tilde (~)⌘ + ⇧ + ~Cycle Through Windows (Reverse)
Control-Tab^ + ⇥Show Next Tab
Control-Shift-Tab^ + ⇧ + ⇥Show Previous Tab
Command-D⌘ + DSplit Panes
Shift-Command-D⇧ + ⌘ + DClose Split Pane
Command-W⌘ + WClose Tab
Shift-Command-W⇧ + ⌘ + WClose Window
Option-Command-W⌥ + ⌘ + WClose Other Tabs
Option-Shift-Command-W⌥ + ⇧ + ⌘ + WClose All
Command-Home⌘ + (fn + ←)Scroll To Top
Command-End⌘ + (fn + →)Scroll To Bottom
Command-Page Up⌘ + (fn + ↑)Page Up
Command-Page Down⌘ + (fn + ↓)Page Down
Option-Command-Page Up⌥ + ⌘ + (fn + ↑)Line Up
Option-Command-Page Down⌥ + ⌘ + (fn + ↓)Line Down

Windows & Tabs Keys

Edit Command Line Keys

The following set of keyboard shortcuts will allow you to move the cursor with ease on the command line when you have multiline commands.

ShortcutKeyboard ShortcutDescription
Option-MousePointer⌥ + ClickReposition the insertion point.
Control-A^ + AMove the insertion point to the beginning of the line.
Control-E^ + EMove the insertion point to the end of the line.
Right ArrowMove the insertion point forwards one character.
Left ArrowMove the insertion point backwards one character.
Option-Right Arrow⌥ + →Move the insertion point forwards one word.
Option-Left Arrow⌥ + ←Move the insertion point backwards one word.
Control-U^ + UDelete to the beginning of the line.
Control-K^ + KDelete to the end of the line.
Option-D⌥ + DDelete forwards to the end of the word.
Control-W^ + WDelete backwards to the beginning of the word.
BackspaceDelete one character to the left.
Function-Backspacefn + ⌫Delete one character to the right.
Control-T^ + TTranspose two characters.

Edit Command Line Keys

Select & Find Text Keys

The following set of keyboard shortcuts is used to find and manipulate text within the terminal application. You can copy and paste text from other documents into a Terminal application.

ShortcutKeyboard ShortcutDescription
Triple-click the lineClick + Click + ClickSelect a complete line of text.
Double-click the wordClick + ClickSelect a word
Shift-Command-DoubleClick⇧ + ⌘ + Cick + ClickSelect a complete file path.
Shift-Command-DoubleClick⇧ + ⌘ + Click + ClickSelect a URL.
Option-Highlight⌥ + HighlightSelect a rectangular block.
Command-X⌘ + XCut
Command-C⌘ + CCopy
Control-Shift-Command-C^ + ⇧ + ⌘ + CCopy Without Background Colour
Option-Shift-Command-C⌥ + ⇧ + ⌘ + CCopy Plain Text
Command-V⌘ + VPaste
Shift-Command-V⇧ + ⌘ + VPaste The Selection
Control-Command-V^ + ⌘ + VPaste Escaped Text
Control-Shift-Command-V^ + ⇧ + ⌘ + VPaste Escaped Selection
Command-F⌘ + FFind
Command-G⌘ + GFind Next
Command-Shift-G⌘ + ⇧ + GFind Previous
Command-E⌘ + EFind using the Selected Text
Command-J⌘ + JJump to the Selected Text
Command-A⌘ + ASelect All
Control-Command-Space^ + ⌘ + ␣Open the Character Viewer

Select & Find Text Keys

Marks & Bookmarks Keys

ShortcutKeyboard ShortcutDescription
Command-U⌘ + UMark
Option-Command-U⌥ + ⌘ + UMark as Bookmark
Shift-Command-U⇧ + ⌘ + UUnmark
Command-Return⌘ + ↩Mark Line and Send Return
Shift-Command-Return⇧ + ⌘ + ↩Send Return without Marking
Shift-Command-M⇧ + ⌘ + MInsert Bookmark
Option-Shift-Command-M⌥ + ⌘ + MInsert Bookmark with Name
Command-Up Arrow⌘ + ↑Jump to Previous Mark
Command-Down Arrow⌘ + ↓Jump to Next Mark
Option-Command-Up Arrow⌥ + ⌘ + ↑Jump to Previous Bookmark
Option-Command-Down Arrow⌥ + ⌘ + ↓Jump to Next Bookmark
Command-L⌘ + LClear to Previous Mark
Option-Command-L⌥ + ⌘ + LClear to Previous Bookmark
Command-K⌘ + KClear to Start
Shift-Command-A⇧ + ⌘ + ASelect Between Marks

Marks & Bookmarks Keys

Other Shortcut Keys

The following set of keyboard shortcuts are a few unrelated commands you can use within the Terminal Application to complete your experience.

ShortcutKeyboard ShortcutDescription
Control-Command-F^ + ⌘ + FEnter Full Screen / Exit Full Screen
Shift-Command-C⇧ + ⌘ + CShow Colours / Hide Colours
Command-Comma (,)⌘ + ,Open Terminal Preferences
Command-P⌘ + PPrint
Option-Command-R⌥ + ⌘ + RSoft Reset Terminal Emulator State
Control-Option-Command-R^ + ⌥ + ⌘ + RHard Reset Terminal Emulator State
Command-Double Click (URL)⌘ + Click + ClickOpen a URL
Command-S⌘ + SExport Text As
Shift-Command-S⇧ + ⌘ + SExport Selected Text As
Control-R^ + RReverse Search Command History
Command-R⌘ + RToggle “Allow Mouse Reporting” Option
Command-Option-O⌘ + ⌥ + VToggle “Use Option As Meta Key” Option
Shift-Command-DownArrow⇧ + ⌘ + ↓Show Alternate Screen
Shift-Command-UpArrow⇧ + ⌘ + ↑Hide Alternate Screen

Other Shortcut Keys

Summary

Congratulations!!! You have learned a number of keyboard shortcuts for Terminal. The Terminal application is a very powerfull tool to use to manage your Mac and all other applications installed on the Mac.

Follow me on any of the different social media platforms and feel free to leave comments.