macOS Terminal Commands

macOS Terminal Commands
Photo by Christian Lue / Unsplash

This is a cheatsheet of macOS terminal commands.

macOS Terminal Cheat Sheet

Navigation

Tab — Auto-complete file/folder names

Ctrl + A — Move to start of line

Ctrl + E — Move to end of line

Option + → — Move forward one word

Option + ← — Move backward one word

Ctrl + F — Move forward one character

Ctrl + B — Move backward one character

Editing

Ctrl + U — Clear before cursor

Ctrl + K — Clear after cursor

Ctrl + W — Delete previous word

Ctrl + T — Swap last two characters

Esc + T — Swap last two words

Ctrl + Y — Paste last cut

Ctrl + _ — Undo last action

Terminal Control

Ctrl + L — Clear screen

Ctrl + C — Kill current process

Ctrl + D — Exit shell

Ctrl + Z — Suspend to background

exit — End shell session

Copy & Paste

Option + Shift + Cmd + C — Copy plain text

Shift + Cmd + V — Paste selection