Navigation
pwd: Print current working directoryls: List contents of current directorycd: Change directorymkdir: Create a new directoryrmdir: Remove a directoryrm: Remove a filecp: Copy a file or directorymv: Move or rename a file or directory
File Operations
cat: Display contents of a fileless: Display contents of a file one page at a timehead: Display first few lines of a filetail: Display last few lines of a filetouch: Create an empty file or update the modification time of an existing filechmod: Change permissions of a file or directorychown: Change ownership of a file or directory
System Information
uname: Print system informationuptime: Print system uptimedf: Show disk usagedu: Show disk usage of a directorytop: Display system processes and their resource usage
Networking
ping: Test network connectivity to a hosttraceroute: Show the network path to a hostifconfig: Display network interface informationnetstat: Display network connections and their status
Package Management
brew: Install, remove, or update packages
Users and Groups
dscl: Add, modify, or remove a user or groupsudo: Run a command with administrative privileges
Miscellaneous
history: Show command historygrep: Search for a pattern in a file or outputtar: Create or extract a compressed archivessh: Connect to a remote system via SSH
This cheat sheet only scratches the surface of what's possible with macOS, but it should give you a good starting point for working with the command line.