50 Must know macOS Terminal Commands


1. File and Directory Management

Command Description
ls List directory contents
cd Change directory
pwd Print working directory
mkdir Make directory
rm Remove files or directories


2. File Manipulation

Command Description
cp Copy files and directories
mv Move or rename files and directories
touch Create an empty file or update file timestamps
chmod Change file permissions
chown Change file owner and group


3. Text Processing

Command Description
cat Concatenate and display file content
grep Search for patterns in files
sed Stream editor for filtering and transforming text
awk Pattern scanning and text processing
wc Word, line, character, and byte count


4. System Information

Command Description
top Display and update sorted information about processes
ps Report a snapshot of current processes
df Report file system disk space usage
du Estimate file space usage
uname Print system information


5. Network Commands

Command Description
ping Send ICMP ECHO_REQUEST to network hosts
ifconfig Configure network interface parameters
netstat Show network status
ssh OpenSSH SSH client (remote login program)
curl Transfer data from or to a server


6. Package Management

Command Description
brew Package manager for macOS
port Package manager for macOS (MacPorts)
gem Ruby package manager
npm JavaScript package manager
pip Python package installer


7. User Management

Command Description
whoami Print effective user name
sudo Execute a command as another user
passwd Change user password
su Substitute user identity
id Print real and effective user and group IDs


8. Process Management

Command Description
kill Send a signal to a process
killall Kill processes by name
jobs List active jobs
bg Send jobs to the background
fg Bring jobs to the foreground


9. Compression and Archiving

Command Description
tar Tape archiver
gzip Compress or expand files
unzip List, test and extract compressed files in a ZIP archive
zip Package and compress (archive) files
bzip2 Block-sorting file compressor


10. Miscellaneous

Command Description
man Format and display the on-line manual pages
history Command history
clear Clear the terminal screen
echo Display a line of text
date Display or set date and time

Comments & Discussion

Facing issues? Have questions? Post them here! We're happy to help!