Cheatsheet - macOS
Quick-reference cheatsheet for macOS keyboard shortcuts, system management commands, and developer utilities.
Keyboard Shortcut Modifier Key Legend
Cmd/⌘: Command KeyOption/⌥: Option (Alt) KeyCtrl/⌃: Control KeyShift/⇧: Shift KeyCaps Lock/⇪: Caps Lock KeyFn: Function KeyEsc: Escape Key
Essential System Shortcuts
- Spotlight Search:
Cmd + Space - Force Quit Application:
Cmd + Option + Esc - Lock Screen:
Ctrl + Cmd + Q - Log Out User:
Shift + Cmd + Q(Immediate:Option + Shift + Cmd + Q) - Show/Hide Dock:
Option + Cmd + D - System Settings:
Cmd + ,(when in Finder or application menu)
Application & Window Management
- Switch Applications:
Cmd + Tab(HoldCmd, tapTabto cycle,~cycles backward) - Cycle Windows of Current App:
Cmd + ~(Backtick / Tilde key) - Close Active Window:
Cmd + W(Close All Windows:Option + Cmd + W) - Quit Active App:
Cmd + Q - Minimize Active Window:
Cmd + M(Minimize All:Option + Cmd + M) - Hide Active App:
Cmd + H(Hide Other Apps:Option + Cmd + H) - Enter Full Screen:
Ctrl + Cmd + F - Mission Control:
Ctrl + Up Arrow(orF3) - App Exposé (Show Current App Windows):
Ctrl + Down Arrow - Switch Virtual Desktops (Spaces):
Ctrl + Left/Right Arrow
Finder Navigation
- Go to Home Folder:
Shift + Cmd + H - Go to Folder (Direct Path):
Shift + Cmd + G(e.g.~/Library/Application Support/) - Go to Desktop:
Shift + Cmd + D - Go to Applications:
Shift + Cmd + A - Show/Hide Hidden Files (
.files):Shift + Cmd + . - Show/Hide Path Bar:
Option + Cmd + P - Quick Look Preview: Select item +
Spacebar - Get Info:
Cmd + I - Duplicate Selected Item:
Cmd + D - Move to Trash:
Cmd + Delete(Empty Trash:Shift + Cmd + Delete)
Screenshots & Screen Recording
- Capture Entire Screen:
Shift + Cmd + 3(Saves to Desktop) - Capture Selected Area:
Shift + Cmd + 4(Drag crosshairs) - Capture Specific Window:
Shift + Cmd + 4, then tapSpacebar, click window - Screenshot & Screen Recording Toolbar:
Shift + Cmd + 5 - Copy Screenshot Directly to Clipboard: Hold
Ctrlwith any shortcut (e.g.,Ctrl + Shift + Cmd + 4)
Text Editing & Navigation
- Move to Beginning / End of Line:
Cmd + Left Arrow/Cmd + Right Arrow - Move to Beginning / End of Document:
Cmd + Up Arrow/Cmd + Down Arrow - Move One Word Left / Right:
Option + Left Arrow/Option + Right Arrow - Select Line / Word: Hold
Shiftwith any movement shortcut - Forward Delete:
Fn + Delete - Delete Word Behind Cursor:
Option + Delete - Delete Entire Line Behind Cursor:
Cmd + Delete - Emoji & Symbol Picker:
Ctrl + Cmd + Space
System Administration & Terminal Power Tools
# Storage & Disk Management
diskutil list # List all disks, APFS containers, and partitions
diskutil apfs list # Inspect APFS container volumes and snapshot seals
diskutil info / # Detailed volume info (mount point, UUID, free space)
hdiutil attach image.dmg # Mount disk image (.dmg) from terminal
hdiutil detach /Volumes/image_name # Unmount disk image
# Security & Gatekeeper
csrutil status # Check System Integrity Protection (SIP) status
spctl --status # Check Gatekeeper execution policy status
xattr -d com.apple.quarantine App.app # Remove Gatekeeper quarantine flag from downloaded app
# Time Synchronization
sudo sntp -sS time.apple.com # Force NTP network time synchronization
# Spotlight Indexing & Metadata
sudo mdutil -E / # Rebuild Spotlight index for root volume
sudo mdutil -i on / # Enable Spotlight indexing
mdls filename.pdf # View all indexed Spotlight metadata attributes for a file
mdfind "kMDItemDisplayName == '*.rs'" # Fast metadata search for files
# Network & DNS
sudo dscacheutil -flushcache # Flush local macOS directory/DNS cache
sudo killall -HUP mDNSResponder # Restart mDNS daemon to apply DNS flush
networksetup -listallnetworkservices # List network interfaces (Wi-Fi, Ethernet)
scutil --dns # Display active DNS nameservers and search domains
# Memory & Kernel Daemons
sudo purge # Flush inactive disk cache and memory buffers
launchctl list # List loaded launchd background services
launchctl print gui/$(id -u) # Inspect per-user launchd service domain
# Hardware & System Profiling
system_profiler SPHardwareDataType # Print CPU, memory, Apple Silicon chip info
system_profiler SPSoftwareDataType # Print macOS version, kernel version, boot volume
sw_vers # Display macOS product name and build version
Application Data Directories
When troubleshooting or completely uninstalling applications:
/Applications: App bundles (.app)~/Library/Application Support/<AppName>: App state, databases, and persistent files~/Library/Preferences/<com.vendor.app.plist>: User preference property lists~/Library/Caches/<com.vendor.app>: Ephemeral application cache files~/Library/Logs/: Per-application log outputs
Recommended Reading
SponsoredCheatsheets - Kubernetes
Cheatsheets - Cloud
Cheatsheets - Tools
Cheatsheets - Editors
Cheatsheets - Databases
Cheatsheets - Shell
Cheatsheets - Lookups


