https://github.com/yangshun/mac-terminal-shortcuts
Useful and common terminal shortcuts for macOS
https://github.com/yangshun/mac-terminal-shortcuts
keyboard macos shortcuts terminal
Last synced: 5 months ago
JSON representation
Useful and common terminal shortcuts for macOS
- Host: GitHub
- URL: https://github.com/yangshun/mac-terminal-shortcuts
- Owner: yangshun
- License: mit
- Created: 2017-04-06T16:24:55.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-02-11T22:49:32.000Z (over 5 years ago)
- Last Synced: 2025-05-05T22:09:04.106Z (5 months ago)
- Topics: keyboard, macos, shortcuts, terminal
- Homepage:
- Size: 3.91 KB
- Stars: 49
- Watchers: 1
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Mac Terminal Shortcuts
A list of **useful** terminal shortcuts for macOS. Some obscure shortcuts like capitalizing words are purposely omitted.
**Note:** To use the Alt Key Shortcuts in macOS:
> Open Terminal > Preferences > Profiles Tab > Keyboard Tab > Check "Use option as meta key"
### Cursor Movement
|Shortcut|Description|
|---|---|
|Ctrl + E|Move cursor to end of the line|
|Ctrl + A|Move cursor to start of the line|
|Ctrl + F|Move cursor one character forward|
|Ctrl + B|Move cursor one character backward|
|Alt + F / Alt + Right|Move cursor one word forward|
|Alt + B / Alt + Left|Move cursor one word backward|
|Alt + Click|Move cursor to clicked character|
|Ctrl + XX|Toggle between the start of line and cursor position|### Editing
Commands with "Cut" will add the cut portion to the clipboard.
|Shortcut|Description|
|---|---|
|Ctrl + L|Clears the screen|
|Ctrl + D|Delete character under the cursor|
|Ctrl + H|Delete character before the cursor|
|Ctrl + K|Cut everything from the cursor to end of the line|
|Ctrl + W / Alt + Backspace|Cut the current word before the cursor|
|Alt + D|Delete the word after the cursor|
|Ctrl + U|Cut the line before the cursor|
|Ctrl + Y|Paste the previous cut text|
|Ctrl + _|Undo your last key press. You can repeat this to undo multiple times|
|Ctrl + T|Swap the last two characters before the cursor|
|Esc + T|Swap the last two words before the cursor|### History
|Shortcut|Description|
|---|---|
|Ctrl + P|Previous command|
|Ctrl + R|Next command|
|Ctrl + S|Forward search|
|Ctrl + R|Reverse search|
|Ctrl + O|End search and execute command|
|Ctrl + G|Abort search (restores original line)|### Process
|Shortcut|Description|
|---|---|
|Ctrl + C|Kills current task (SIGINT)|
|Ctrl + D|Inserts an EOF|
|Ctrl + Z|Pauses current task|
|Ctrl + S|Stop output to the screen (for long running verbose commands)|
|Ctrl + Q|Allow output to the screen (if previously stopped using stop output command)|