Command | Description |
---|---|
Control + A | Jump to beginning of line |
Control + E | Jump to end of line |
Control + U | Delete text before cursor |
Control + K | Delete text after cursor |
Control + W | Delete word before cursor |
Control + T | Swap last two characters before cursor |
Esc + T | Swap last two words before cursor |
Control + R | Search through previous commands |
Control + L | Clear screen (or Command + K) |
Control + C | Kill current process |
Control + D | Exit shell |
Command | Description |
---|---|
open <file> |
Open file |
open . |
Open current directory |
top |
Display active processes |
clear |
Clear screen |
Command | Description |
---|---|
history <number> |
Display last number commands |
Control + R |
Search through previous commands |
!* |
Use arguments from previous command |
!$ |
Use last argument from previous command |
Esc + . |
Print arguments from previous command |
!<value> |
Run previous command starting with value |
!! |
Run previous command |
Command | Description |
---|---|
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist |
Stop SSH service |
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist |
Start SSH service |
Adapted from: https://github.com/0nn0/terminal-mac-cheatsheet
Esc + F
= Forward one wordEsc + B
= Backward one word