macOS is built on Unix. That means you have the full power of the command line at your fingertips. Master the terminal to work faster than any GUI user.
The default shell on modern macOS (Catalina+). It's like Bash but with superpowers like better auto-completion and theming.
The missing package manager for macOS. Install it once, and you can download any tool (Python, Node, Docker) with one command.
"SuperUser DO". This command gives you admin privileges. Use it wisely; with great power comes great responsibility.
Mission: Try typing commands. Start with ls to list files, then try help for a list of secret commands.
(Yes, this is a real interactive fake terminal!)
| pwd | Print Working Directory. Shows exactly where you are. |
| ls -la | List all files (including hidden ones starting with .) in a list format. |
| cd [folder] | Change Directory. Use cd .. to go back one level. |
| mkdir [name] | Make Directory. Creates a new folder. |
| touch [file] | Creates an empty file (e.g., touch index.html). |
| cp [src] [dest] | Copy a file. Use cp -r to copy a folder. |
| mv [src] [dest] | Move (or Rename) a file. |
| rm [file] | Remove (Delete) a file. Warning: No trash bin! |
| open . | Opens the current folder in Finder. Very useful! |
| sudo [cmd] | Run command as Admin (Root). Requires password. |
| chmod +x [file] | Make a script executable. |
| ps aux | Show all running processes. |
| kill [pid] | Kill a process by ID. Use kill -9 to force kill. |
| top | Show real-time CPU/Memory usage (press Q to exit). |
| ping [url] | Check if a server is reachable (e.g., ping google.com). |
| ifconfig | Show network interfaces and IP addresses. |
| curl [url] | Fetch data from a URL. Great for testing APIs. |
| lsof -i :[port] | See what app is using a specific port (e.g., :8080). |
If you don't have Brew, install it first:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
| brew install [pkg] | Install software (e.g., brew install python). |
| brew list | List all installed packages. |
| brew update | Update Homebrew itself and package definitions. |
| brew upgrade | Upgrade all installed packages to latest versions. |