Mac OS Hot Keys and Terminal Commands

Keyboard Modifiers

macOS Keyboard Shortcuts Name Description
Cmd Command Primary modifier key. Used in most keyboard shortcuts.
Option Option (Alt) Secondary modifier key. Uncomments alternative functions.
Shift Shift Modifier key for selecting, combining, and changing functions.
CapsLock Caps Lock Case switch. When combined with modifiers, they perform special functions.
Ctrl Control Modifier key for system and terminal commands.
⎋Esc Escape Cancel the current action, exit full-screen mode.
Tab Tab Switches focus between elements, autocompletes in the terminal.
Backspace Delete Delete the character to the left of the cursor.
Enter Return Confirm an action, execute a command, or break a line.
Up Up Arrow Navigate up, previous command in terminal history.
Down Down Arrow Navigate down, next command in terminal history.
Left Left Arrow Navigate left, cursor movement.
Right Right Arrow Navigate to the right, move the cursor.
Fn Function / Globe Switches to the function keys F1–F12, Page Up/Down, Home/End.
Space Space (Space) Quick Look — quickly preview a selected file in Finder.

Basic Shortcuts

macOS Keyboard Shortcuts Name Description
Basic
Cmd + X Cut Cut the selected item and copy it to the clipboard.
Cmd + C Copy Copy the selected item to the clipboard.
Cmd + V Paste Paste the contents of the clipboard into the current document.
Cmd + Z Undo Undo the last action.
Cmd + Shift + Z Redo Redo the undone action.
Cmd + A Select All Select all elements in the document or window.
Cmd + F Find Open the search field or find an element in the document.
Cmd + G Find Again Find the next occurrence. Cmd + Shift + G — previous.
Cmd + H Hide App Hide windows of the current application. Cmd + Option + H — hide all but the active window.
Cmd + M Minimize Minimize window to the Dock. Cmd + Option + M — Minimize all application windows.
Cmd + O Open Open the selected item or file selection dialog.
Cmd + P Print Open the Print dialog box.
Cmd + Q Quit Close the current application.
Cmd + S Save Save the current document.
Cmd + T New Tab Open a new tab in the application.
Cmd + W Close Window Close the active window. Cmd + Option + W — close all windows.
Option + Cmd + Esc Force Quit Force quit a frozen application.
Cmd + Space Spotlight Show/hide the Spotlight search field.
Option + Cmd + Space Spotlight in Finder Perform a Spotlight search from the Finder window.
Ctrl + Cmd + Space Character Viewer Open panel Emoji and symbols.
Ctrl + Cmd + F Full Screen Toggle full-screen mode (supported by apps).
Cmd + Tab Switch App Switch to the last used application.
Cmd + ` Switch Window Switch between windows of the current application.
Shift + Cmd + 5 Screenshot / Recording Screenshot or screen recording (macOS Mojave and later). Shift + Cmd + 3 — full screenshot. Shift + Cmd + 4 — region.
Shift + Cmd + N New Folder Create a new folder in Finder.
Ctrl + Cmd + N New Smart Folder Create a folder containing the currently selected group elements.
Cmd + , Preferences Open the current application's preferences.
Fn + Q Quick Note Create a quick note (Quick Note).
Shift + Cmd + 3 Screenshot Full Screen Screenshot of the entire screen.
Shift + Cmd + 4 Screenshot Selection Screenshot of the selected area of ​​the screen.
Ctrl + Space Switch Input Source Switch the input source (when using multiple languages).
Ctrl + Option + Space Switch Previous Input Switch to the previous input source.

Sleep, Wake, and Terminate

macOS Keyboard Shortcuts Name Description
Power and Wake
Power Button Power On / Wake Press to turn on or wake your Mac. On keyboards with Touch ID, press to lock the screen.
Hold down the power button Force Off Force shut down your Mac (if unresponsive).
Hold down the power button for 1.5 seconds Sleep (built-in) On built-in keyboards, noTouch ID — put to sleep.
Ctrl + Shift + Power button Sleep Display On built-in keyboards without Touch ID — put the displays to sleep.
Ctrl + Power button Sleep / Restart / Shut Down Show dialog: reboot, sleep, or shut down.
Ctrl + Cmd + Power button Force Restart Force restart without saving documents.
Ctrl + Option + Cmd + Power button Shut Down Close all apps, then shut down your Mac. Asks about saving documents.
Option + Cmd + Power button Sleep (built-in keyboard) On built-in keyboards without Touch ID, put to sleep.
Lock and log out
Ctrl + Cmd + Q Lock Screen Lock the screen immediately.
Shift + Cmd + Q Log Out Log out of account records. Will ask for confirmation.
Option + Shift + Cmd + Q Log Out without confirmation Log out of your account without confirmation.
Option (when selected from the menu) ) No confirmation Complete the action (Logout, Shut Down, Restart) without a confirmation dialog.

Finder and system hotkeys

macOS Hotkeys Name Description
Files and folders
Cmd + D Duplicate Duplicate the selected files.
Cmd + E Eject Unmount the selected disk or volume.
Cmd + I Get Info Open the "Properties" window for the selected file.
Cmd + R Show Original / Refresh (1) In Finder — show the original for an alias. (2) In Safari/Calendar — refresh the page.
Cmd + Delete Move to Trash Move the selected item to the Trash.
Shift + Cmd + Delete Empty Trash Empty Trash.
Option + Shift + Cmd + Delete Empty Trash without confirmation Empty Trash without confirmation dialog.
Navigation in Finder
Shift + Cmd + C Computer Open the Computer window (all drives).
Shift + Cmd + D Desktop Open the Desktop folder.
Shift + Cmd + F Recents Open the Recent files window.
Shift + Cmd + G Go to Folder Open the Go to Folder window.
Shift + Cmd + H Home Open the current user's home folder.
Shift + Cmd + I iCloud Drive Open iCloud Drive.
Shift + Cmd + K Network Open network window.
Option + Cmd + L Downloads Open downloads folder.
Shift + Cmd + O Documents Open the Documents folder.
Shift + Cmd + R AirDrop Open the AirDrop window.
Shift + Cmd + U Utilities Open the Utilities folder.
View and panels
Option + Cmd + D Dock Hide/show Dock.
Option + Cmd + P Path Bar Hide/show the path bar in Finder windows.
Option + Cmd + S Sidebar Hide/show the sidebar in Finder windows.
Cmd + / Status Bar Hide/show the status bar in Finder windows.
Cmd + J View Options Open view options.
Cmd + 1 IconsDisplay items as icons.
Cmd + 2 List Display items as a list.
Cmd + 3 Columns Display items in columns.
Cmd + 4 Gallery Display items in the gallery.
Shift + Cmd + T Tab Bar Hide/show the tab bar.
Shift + Cmd + P Preview Pane Hide/show the preview pane in Finder windows.
Cmd + [ Previous Folder Go to the previous folder.
Cmd + ] Next Folder Go to the next folder.
Cmd + Up Parent Folder Open the folder containing the current one.
Cmd + Down Open Selected Open the selected item.
Right Open Folder (list) Open the selected folder (only in the list).
Left Close Folder (list) Close the selected folder (list only).
Special Actions
Cmd + K Connect to Server Open the server connection window.
Cmd + N New Finder Window Open a new Finder window.
Option + Cmd + N New Smart Folder Create a new smart folder.
Cmd + Option + T Toolbar (single tab) Hide/show the toolbar (single tab).
Option + Cmd + V Move from Clipboard Move files from the clipboard from the original location to the current location.
Cmd + Y Quick Look Quickly preview selected files.
Option + Cmd + Y Quick Look Slideshow Start a quick look slideshow.
Cmd + Option + Brightness Down Mirror Displays Enable/disable video mirroring for multiple displays.
Option + Brightness Up Displays Settings Open display settings.
Ctrl + Brightness Up / Brightness Down External Display Brightness Change the brightness of the external display (if supported).
Option + Shift + Brightness Up / Brightness Down Fine Brightness Control Finely adjust display brightness.
Option + Mission Control Mission Control Settings Open Mission Control settings.
Cmd + Mission Control or Fn + F11 Show Desktop Show desktop.
Ctrl + Up Mission Control Open Mission Control.
Ctrl + Down Show All Windows Show all windows of the current application.
Fn + A Show/Hide Dock Hide/show the Dock.
Fn + C Control Center Hide/show Control Center.
Fn + D Dictation Start or stop dictation.
Fn + N Notification Center Hide/show Notification Center.
Fn + Fn Character Viewer Open the Character panel.
Ctrl + Shift + Cmd + T Add to Dock Add the selected Finder item to the Dock.
Option + Volume Up> Sound Settings Open sound settings.
Option + Shift + Volume Up / Volume Down> Fine Volume Control Fine volume control.
Option + Keyboard Brightness Up Keyboard Settings Open keyboard settings.
Option + Shift + Keyboard Brightness Up / Keyboard Brightness Down Fine Keyboard Brightness Finely adjust keyboard brightness.
Cmd + click the window title Folder Path Show folders containing the current folder.
Fn + Shift + A Show Apps / Launchpad Show apps (macOS Tahoe 26+) or Launchpad (earlier).
Cmd + Cmd (twice) Type to Siri Turn Type to Siri on/off.
Ctrl + Space Switch Input Source Select the next input source (when using multiple languages).
Ctrl + Option + Space Switch Previous Input Select the previous input source.

Keyboard Shortcuts: Working with Text

macOS Keyboard Shortcuts Title Description
Text Formatting
Cmd + B Bold Bold text.
Cmd + I Italic Italicize text.
Cmd + U Underline Underline text.
Cmd + T Fonts Open/hide the fonts window.
Cmd + K Add Link Add a web link to the selected text.
Ctrl + Cmd + D Define Show the definition of the selected word.
Shift + Cmd + : Spelling and Grammar Open the spelling and grammar window.
Cmd + ; Find Misspelled Find spelling errors in the document.
Option + Cmd + F Go to Search Go to the search field.
Option + Cmd + T Toolbar Hide/show the application toolbar.
Delete
Option + Delete Delete Word Delete the word to the left of the cursor.
Ctrl + H Delete Backward Delete the character to the left of the cursor (similar to Delete).
Ctrl + D Delete Forward Delete character to the right of the cursor. Also: Fn + Delete.
Ctrl + K Kill Line Cut text from the cursor to the end of the paragraph.
Ctrl + Y Yank Insert text from the kill ring (within the current application).
Cursor Navigation
Fn + Up Page Up Scroll up one pagenitsa.
Fn + Down Page Down Scroll down one page.
Fn + Left Home Go to the beginning of the document.
Fn + Right End Go to the end of the document.
Cmd + Up Beginning of Document Move the cursor to the beginning of the document.
Cmd + Down End of Document Move the cursor to the end of the document.
Cmd + Left Beginning of Line Move the cursor to the beginning of the line.
Cmd + Right End of Line Move the cursor to the end of the line.
Option + Left Previous Word Move the cursor to the beginning of the previous word.
Option + Right Next Word Move cursor to the end of the next word.
Selection
Shift + Cmd + Up Select to Beginning Select text from the cursor to the beginning of the document.
Shift + Cmd + Down Select to End Select text from the cursor to the end of the document.
Shift + Cmd + Left Select to Line Start Select text from the cursor to the beginning of the line.
Shift + Cmd + Right Select to Line End Select text from the cursor to the end of the line.
Shift + Up Select Line Up Select to the nearest character on the line above.
Shift + Down Select Line Down Select to the nearest character on the line below.
Shift + Left Select Char Left Select one character to the left.
Shift + Right Select Char Right SelectOne character to the right.
Option + Shift + Up Select Paragraph Up Select to the beginning of the current paragraph, then the next.
Option + Shift + Down Select Paragraph Down Select to the end of the current paragraph, then the next one.
Option + Shift + Left Select Word Left Select to the beginning of the current word, then the next.
Option + Shift + Right Select Word Right Select to the end of the current word, then the next.
Emacs Emulation (Control)
Ctrl + A Move to Line Start Go to the beginning of the line (similar to Home).
Ctrl + E Move to Line End Go to the end of the line (similar to End).
Ctrl + F Move Forward Move forward one character.
Ctrl + B Move Backward Move backward one character.
Ctrl + L Center Cursor Center the cursor in the visible area.
Ctrl + P Move Up Move up one line.
Ctrl + N Move Down Move down one line.
Ctrl + O Insert Line Insert a new line after the cursor.
Ctrl + T Swap Characters Swap characters around the cursor.
Text alignment
Cmd + { Left Align Left-align text.
Cmd + } Right Align Right-align text.
Shift + Cmd + | Center Align Center text.
Option + Cmd + C Copy Style Copy the formatting of the selected element.
Option + Cmd + V Paste Style Apply copied stor to the selected element.
Option + Shift + Cmd + V Paste and Match Style Paste with formatting of surrounding content.
Option + Cmd + I Inspector Open/hide the inspector window.
Shift + Cmd + P Page Setup Open the page setup window.
Shift + Cmd + S Save As / Duplicate Open the “Save As” dialog or duplicate the document.
Shift + Cmd + - Decrease Size Decrease the size of the selected element.
Shift + Cmd + + Increase Size Increase the size of the selected element.
Cmd + = Increase Size (alt) Increase the size of the selected item (alternative shortcut).
Cmd + D Desktop from Dialog Select a desktop folder from the Open/Save dialog.
Ctrl + Tab Next Control (text field) Go to the next control when a text field is selected.
Ctrl + Shift + Tab Previous Control Group Go to the previous group of controls.
Shift + Cmd + ? Help Open the application's help.

Keyboard Shortcuts: Accessibility

macOS Keyboard Shortcuts Name Description
Vision
Ctrl + Option + Cmd + 8 Invert Colors Invert screen colors.
Ctrl + Option + Cmd + , Reduce Contrast Reduce screen contrast.
Ctrl + Option + Cmd + . Increase Contrast Increase screen contrast.
Keyboard Focus
Ctrl + F2 Focus Menu Bar Move Focusa piece on the menu. Arrows — navigation, Enter — open.
Ctrl + F3 Focus Dock Move focus to the Dock.
Ctrl + F4 Focus Window Move focus to the active window.
Ctrl + F5 Focus Toolbar Move focus to the window's toolbar.
Ctrl + F6 Focus Floating Window Move focus to a floating window.
Ctrl + Shift + F6 Focus Previous Panel Move focus to the previous panel.
Ctrl + F7 Tab Navigation Change the behavior of the tab: between all elements or only text fields.
Ctrl + F8 Status Menu Move focus to the status menu in the menu bar.
Cmd + ` Next Window Activate the next open window in the application.
Shift + Cmd + ` Previous Window Activate the previously open window in the application.
Option + Cmd + ` Window Drawer Move focus to the drawer window.
Other
Option + Cmd + F5 Accessibility Panel Open the accessibility hotkey panel.
Triple-tap Touch ID Accessibility Panel Open the accessibility hotkey panel.
Option + Double-Click Open in Separate Window Open the item in a separate window, then close the original.
Cmd + Double-Click Open in Tab Open the folder in a new tab or window.
Cmd + Double-Click and Drag Move Across Volumes Move the item to another volume (instead of copying it).
Option + Drag Copy on Drag Copy the dragged item. The cursor changes.
Option + Cmd + drag Alias ​​on Drag Create an alias for the dragged element. The cursor changes.
Option + click the opening triangle Open All Subfolders Open all subfolders (list only).

macOS Terminal Commands

Command Execution Name Description
File System
ls File List Display directory contents. Flags: -la (all files with details), -lha (human-readable size).
cd Change Directory Go to the specified directory. cd ~ — home, cd - — previous.
pwd Current Directory Print the full path to the current working directory.
mkdir Create Directory Create a directory. The -p flag creates nested directories.
touch Create File Create an empty file or update the modification time of an existing one.
cp Copy Copy files/directories. The -R flag is recursive.
mv Move Move or rename a file/directory.
rm Delete Delete files/directories. The -rf flag is forced recursive.
cat File contents Display the file contents to the terminal.
less Pagination Display the file contents one page at a time. q — exit.
head Start of file Display the first 10 lines of the file. The -n N flag — N lines.
tail End of file Display the last 10 lines. The -f flag enables real-time tracking.
find File search Find files by criteria. Example: find . -name "*.log" -mtime -1 — files from the last 24 hours.
du -sh Directory size Show directory size in human-readable format.
df -h Disk Space Show free space on mounted volumes.
tar Archive Create/unzip an archive. tar -czf (create gzip) / tar -xz (unzip).
ditto Copy (macOS) macOS equivalent of tar. Preserves metadata and resources. ditto source dest.
Processes and Services
ps aux List Processes Display all running processes with detailed information.
pgrep Find a Process Find a PID by process name. pgrep -f pattern — full pattern match.
kill Kill process Kill process by PID. kill -9 PID — force kill (SIGKILL).
killall Kill by name Kill all processes with the specified name. killall -HUP nginx — restart.
top Monitoring Real-time process monitoring. q — exit. o — filter.
htop Advanced Monitoring Interactive MonitoringTorring (installed via Homebrew). brew install htop.
lsof Open Files List of open files and sockets. lsof -i :8080 — processes on port 8080.
netstat Network Connections Network connections, routing tables. netstat -an | grep ESTABLISHED.
launchctl list Launchd Services List of running launchd services (macOS daemon aggregator).
sudo launchctl bootstrap Load Service Load/Reload the launchd service. Requires sudo.
Network
ping Availability Check Check host availability. ping -c 4 google.com — 4 packets.
traceroute Routing Show the path of packets to the host.
ifconfig Network Interfaces Configure and display network interfaces. IP addresses, masks.
ipconfig getaddrinfo DNS Resolve Resolve DNS. ipconfig getaddrinfo example.com.
scutil System Controller Manage Network Settings. scutil --dns — Show DNS settings.
curl HTTP Requests Data Transfer. curl -I https://example.com — response headers.
networksetup Network setup Network setup from the terminal. networksetup -listallhardwareports.
nslookup DNS Query DNS query for the specified domain.
dig DNS Query (Advanced) Advanced DNS Query. dig example.com ANY.
ssh SSH connection Remote connection. ssh user@host -p 22.
scp SCP transfer Copying via SSH. scp file user@host:/path.
sftp SFTP session Interactive FTP over SSH. sftp user@host.
System Information
sw_vers macOS Version Show macOS version and build.
system_profiler System Profile Detailed system information. system_profiler SPHardwareDataType — Hardware.
uname -a Kernel Show kernel and OS information.
hostname Hostname Show or set the hostname.
uptime Uptime System uptime and load average.
sysctl Kernel Parameters Show/set kernel parameters. sysctl -a — all parameters.
diskutil list Disks List of all disks and partitions.
diskutil info Disk Information Detailed disk information. diskutil info /.
pmset -g Power Power saving settings. pmset -g custom — detailed.
powermetrics Power Metrics Power and thermal metrics. Requires sudo.
memory_pressure Memory Pressure Show memory usage and swap.
fs_usage FS Usage Real-time file system monitoring. Requires sudo.
Privileges and Security
whoami Current User Show the current user's name.
id UID/GID Show the current user's UID, GID, and groups.
sudo Superuser do Run command as root. Prompts for password.
chmod Change permissions Change access permissions. chmod 755 file, chmod +x script.sh.
chown Change owner Change the owner/group of a file. chown user:group file.
xattr Extended Attributes Managing Extended Attributes (Quarantine). xattr -d com.apple.quarantine app.
spctl Gatekeeper Managing Gatekeeper. spctl --master-disable — disable application verification.
tccutil TCC Permissions Manage accessibility permissions. tccutil reset All — reset everything.
security find-identity Signature List Show signature codes and trusted chains.
codesign Code Signature Code Verification/Signature codesign -dv app — information.
grep Text Search Find strings by pattern. grep -ri "pattern" . — recursive, case-insensitive.
awk Text Field Processing Text Data Processing Language. awk '{print $1}' file — first field.
sed Stream Editor Find and replace in a stream. sed -i '' 's/old/new/g' file.
sort Sorting Sorting strings. sort -n -r — numerical descending.
uniq Unique rows Remove duplicates. sort file | uniq.
wc Line count Line, word, and byte counter. wc -l file.
xargs Arguments from stdin Pass standard input as arguments. find . -name "*.log" | xargs grep "error".
jq JSON Processor Parsing JSON in the terminal. cat data.json | jq '.key'.
plutil Plist Parsing Reading/Writing macOS plist files. plutil -p config.plist — output.
Homebrew and Packages
brew --version Homebrew version Show the installed Homebrew version.
brew install Install package Install package. brew install wget.
brew uninstall Uninstall package Uninstall package. brew uninstall pkg.
brew update Update Homebrew Update the Homebrew repository list.
brew upgrade Update packages Update all installed packages. brew upgrade pkg — one package.
brew search Search for packages Search for packages in the repository. brew search pattern.
brew list Installed packages Show all installed packages.
brew info Package information Detailed package information.
brew deps Dependencies Show package dependencies. brew deps --tree pkg.
brew doctor Installation check Check Homebrew for problems.
brew cleanup Cleanup Remove old package versions and cache.
brew services list Homebrew Services Show all services managed by Homebrew.