List of macOS commands in tables categorized by tool types. source
Command | Description |
---|---|
cp |
Copy files to another location |
mv |
Move or rename files or directories |
rm |
Remove files |
mkdir |
Create new folders |
ls |
List files |
find |
Search for files |
locate |
Find files by name |
touch |
Change file timestamps |
chmod |
Change access permissions |
chown |
Change file owner and group |
ln |
Make hard or symbolic links |
lsregister |
Reset the Launch Services database |
stat |
Display the status of a file |
file |
Determine file type |
lsof |
List open files |
Command | Description |
---|---|
ping |
Test network connection |
ifconfig |
Configure network interface parameters |
netstat |
Show network status |
curl |
Transfer data from or to a server |
ftp |
Internet file transfer |
nc or netcat |
Read/write data across networks |
ssh |
Secure shell for remote login |
scp |
Secure copy files between hosts |
dig |
DNS lookup |
ipconfig |
View/control IP configuration state |
networksetup |
Configure network settings |
traceroute |
Trace route to host |
tcpdump |
Dump network traffic |
airport |
Manage Apple AirPort |
Command | Description |
---|---|
ps |
Display process status |
top |
Display active processes |
kill |
Terminate a process by PID |
killall |
Terminate processes by name |
fg |
Move a job to the foreground |
bg |
Send a job to the background |
jobs |
List active jobs |
disown |
Unbind a job from the current session |
wait |
Wait for a process to complete |
nice |
Set priority of a command |
nohup |
Run a command immune to hangups |
Command | Description |
---|---|
diskutil |
Disk utilities - Format, Verify, Repair |
df |
Display free disk space |
du |
Estimate file space usage |
csrutil |
Configure System Integrity Protection (SIP) |
mount |
Mount a filesystem |
umount |
Unmount a filesystem |
fsck |
Filesystem consistency check and repair |
dd |
Clone disks |
nvram |
Manipulate firmware variables |
mdutil |
Manage Spotlight metadata |
Command | Description |
---|---|
system_profiler |
Report system configuration |
sw_vers |
Print macOS version |
hostname |
Print or set system name |
uptime |
Show how long the system has been running |
scutil |
Manage system configuration parameters |
pmset |
Power management settings |
launchctl |
Load or unload daemons/agents |
sysctl |
Get or set kernel state |
csrutil |
Configure System Integrity Protection (SIP) |
defaults |
Set preferences |
Command | Description |
---|---|
alias |
Create an alias |
bash |
Bourne-Again SHell |
zsh |
Z shell |
awk |
Find/replace text in file(s) |
sed |
Stream editor for file transformations |
source |
Execute commands from a file |
env |
List or set environment variables |
echo |
Display text on screen |
read |
Read a line from standard input |
export |
Set an environment variable |
trap |
Run commands on signal |
shasum |
Print/check SHA checksums |
Command | Description |
---|---|
gzip |
Compress/decompress files |
bzip2 |
Compress/decompress files |
tar |
Archive files |
zip |
Package and compress files |
unzip |
Extract zip files |
cpio |
Copy files to and from archives |
Command | Description |
---|---|
nano |
Simple text editor |
vim |
Advanced text editor |
sed |
Stream editor for transforming text |
grep |
Search for patterns in text |
awk |
Pattern scanning and processing language |
tr |
Translate/squeeze/delete characters |
wc |
Count words, lines, and characters in text |
fmt |
Reformat paragraph text |
Command | Description |
---|---|
cal |
Display a calendar |
man |
Display help for commands |
bc |
Arbitrary precision calculator |
say |
Convert text to audible speech |
time |
Measure program resource use |
screen |
Terminal multiplexer |
open |
Open files, folders, URLs, applications |
osascript |
Execute AppleScript |
pbcopy |
Copy text to the clipboard |
pbpaste |
Paste text from the clipboard |