MacOS CheatSheet
Â
Category | Command | Description |
---|---|---|
Navigation | cd ~ | Go to home directory |
Navigation | cd .. | Go up one directory level |
Navigation | pwd | Print current directory path |
Navigation | ls -la | List all files with details |
File Operations | touch file.txt | Create an empty file |
File Operations | mkdir folder | Create a directory |
File Operations | cp file1.txt file2.txt | Copy file |
File Operations | mv file.txt folder/ | Move or rename file |
File Operations | rm file.txt | Delete file |
File Operations | open file.txt | Open file with default app |
System Info | top | Show running processes |
System Info | df -h | Disk space usage |
System Info | uptime | System uptime |
System Info | sw_vers | macOS version info |
Networking | ping google.com | Test internet connectivity |
Networking | ifconfig | Show network interfaces |
Networking | netstat -an | Show active connections |
Homebrew | brew install wget | Install a package |
Homebrew | brew update | Update package lists |
Homebrew | brew upgrade | Upgrade installed packages |
Homebrew | brew list | List installed packages |
macOS Utilities | mdfind "text" | Search using Spotlight from terminal |
macOS Utilities | say "Hello world" | Use macOS voice to speak |
macOS Utilities | open . | Open current folder in Finder |
macOS Utilities | defaults write | Modify macOS settings |