Essential Terminal Shortcuts: macOS, Linux & Windows Cheat Sheet
By IT-Journey Team
Complete reference guide for terminal keyboard shortcuts across macOS, Linux, and Windows. Master command line navigation, editing, and productivity shortcuts for Bash, Zsh, and PowerShell.
Master the command line with these essential keyboard shortcuts for macOS Terminal, Linux shells (Bash/Zsh), and Windows PowerShell/Command Prompt.
📋 Quick Reference Card
Action
macOS/Linux
Windows PowerShell
Clear screen
Ctrl + L
Ctrl + L or cls
Cancel command
Ctrl + C
Ctrl + C
Exit terminal
Ctrl + D
exit
Previous command
↑ or Ctrl + P
↑
Search history
Ctrl + R
Ctrl + R
🍎 macOS & Linux Terminal Shortcuts
Navigation Shortcuts
Shortcut
Action
Description
Ctrl + A
Beginning of line
Move cursor to start of command
Ctrl + E
End of line
Move cursor to end of command
Ctrl + B
Back one character
Move left (same as ← arrow)
Ctrl + F
Forward one character
Move right (same as → arrow)
Alt + B
Back one word
Jump to previous word
Alt + F
Forward one word
Jump to next word
Ctrl + XX
Toggle position
Switch between cursor and start
Editing Shortcuts
Shortcut
Action
Description
Ctrl + U
Cut to beginning
Delete from cursor to line start
Ctrl + K
Cut to end
Delete from cursor to line end
Ctrl + W
Cut word before
Delete word before cursor
Alt + D
Cut word after
Delete word after cursor
Ctrl + Y
Paste (yank)
Paste last cut text
Ctrl + T
Transpose characters
Swap character with previous
Alt + T
Transpose words
Swap word with previous
Alt + U
Uppercase word
Convert word to UPPERCASE
Alt + L
Lowercase word
Convert word to lowercase
Alt + C
Capitalize word
Capitalize first letter
History Shortcuts
Shortcut
Action
Description
Ctrl + R
Reverse search
Search command history backwards
Ctrl + S
Forward search
Search command history forwards
Ctrl + G
Exit search
Cancel history search
Ctrl + P
Previous command
Go to previous history entry
Ctrl + N
Next command
Go to next history entry
!!
Repeat last
Execute last command
!$
Last argument
Use last argument of previous command
!*
All arguments
Use all arguments of previous command
!string
History match
Run last command starting with “string”
Screen Control
Shortcut
Action
Description
Ctrl + L
Clear screen
Clear terminal (preserves current line)
Ctrl + S
Pause output
Freeze terminal output
Ctrl + Q
Resume output
Unfreeze terminal output
Process Control
Shortcut
Action
Description
Ctrl + C
Cancel/Interrupt
Stop current command
Ctrl + Z
Suspend
Suspend current process (use fg to resume)
Ctrl + D
Exit/EOF
Exit shell or send end-of-file
🪟 Windows PowerShell Shortcuts
Navigation Shortcuts
Shortcut
Action
Description
Home
Beginning of line
Move cursor to start
End
End of line
Move cursor to end
Ctrl + ←
Back one word
Jump to previous word
Ctrl + →
Forward one word
Jump to next word
Editing Shortcuts
Shortcut
Action
Description
Ctrl + Backspace
Delete word before
Delete word before cursor
Ctrl + Delete
Delete word after
Delete word after cursor
Escape
Clear line
Clear current input line
Insert
Toggle insert mode
Switch between insert/overwrite
History Shortcuts
Shortcut
Action
Description
↑ / ↓
Browse history
Navigate through command history
Ctrl + R
Reverse search
Search history (PSReadLine)
F7
History window
Show command history popup
F8
Search history
Search history by prefix
F9
Run by number
Run command by history number
Screen Control
Shortcut
Action
Description
Ctrl + L
Clear screen
Clear terminal screen
Ctrl + Home
Clear scroll
Clear scrollback buffer
🔥 Power User Tips
Bash/Zsh Bang Commands
# Repeat last command!!# Repeat with sudosudo!!# Last argument of previous commandcd!$# All arguments of previous commandecho!*# Run command #42 from history!42
# Run last command starting with "git"!git
# Run last command containing "docker"!?docker?
History Expansion
# Show history with line numbershistory# Show last 10 commandshistory 10
# Execute command by number!123
# Replace and execute
^old^new^ # Replace 'old' with 'new' in last command
Directory Navigation Shortcuts
# Go to home directorycd ~
cd# Go to previous directorycd -
# Go up one levelcd ..
# Go up multiple levelscd ../..
cd ../../..
# Push/Pop directories (Bash/Zsh)pushd /some/path
popd
🎯 Platform-Specific Notes
macOS Terminal
Option key: Use Option instead of Alt for word navigation
Terminal app settings: Enable “Use Option as Meta key” in Preferences → Profiles → Keyboard
iTerm2 users: Most shortcuts work the same, with additional customization options
Linux (Bash/Zsh)
Alt key shortcuts: May require terminal emulator configuration
Zsh users: Many shortcuts are the same, with additional Zsh-specific features
Tmux/Screen users: Prefix key may intercept some shortcuts
Windows PowerShell
PSReadLine module: Enables Bash-like shortcuts in PowerShell
Windows Terminal: Supports more shortcuts than legacy CMD
Pro tip: Print this cheat sheet and keep it next to your keyboard until these shortcuts become muscle memory!
Last Updated: December 2025
Author: IT-Journey Team
Found this helpful? Share it with fellow developers! 🚀
We value your privacy
This website uses cookies and similar technologies to enhance your browsing experience, analyze traffic, and provide personalized content.
Learn more in our Privacy Policy.
Cookie Preferences
Customize your cookie preferences below. You can change these settings at any time by clicking the cookie preferences link in our footer.
Essential Cookies
Always Active
These cookies are necessary for the website to function properly. They enable core functionality such as navigation, security, and accessibility features.
Analytics Cookies
These cookies help us understand how visitors interact with our website by collecting anonymous information about page visits, time spent, and user behavior patterns.