12/16/2017 An A-Z Index of the Apple macOS command line - SS64 Command line reference
( SS64 ) Links Syntax Search
An A-Z Index of the Apple macOS command line
afconvert Audio File Convert
afinfo Audio File Info
afplay Audio File Play
airport Manage Apple AirPort
alias Create an alias •
alloc List used and free memory
apropos Search the whatis database for strings
asr Apple Software Restore
atsutil Font registration system utility
awk Find and Replace text within file(s)
b
basename Convert a full pathname to just a filename
bash BourneAgain SHell
bg Send to background •
bind Set or display readline key and function bindings •
bless Set volume bootability and startup disk options
break Exit from a For, While, Until or Select loop •
builtin Execute a shell builtin •
bzip2 Compress or decompress files
c
caffeinate Prevent the system from sleeping
cal Display a calendar
calendar Reminder Service
caller Return the context of a subroutine call •
cancel Cancel print jobs
case Conditionally perform a command •
cat Concatenate and print (display) the content of files
cd Change Directory •
chflags Change a file or folder's flags
chgrp Change group ownership
chmod Change access permissions
chown Change file owner and group
chroot Run a command with a different root directory
cksum Print CRC checksum and byte counts
clear Clear terminal screen
cmp Compare two files
comm Compare two sorted files line by line
command Run a command (not a function) •
complete Edit a command completion [word/pattern/list] •
continue Resume the next iteration of a loop •
cp Copy one or more files to another location
cron Daemon to execute scheduled commands
crontab Schedule a command to run at a later date/time
csplit Split a file into contextdetermined pieces
csrutil Configure System Integrity Protection (SIP)
curl Transfer data from or to a server
cut Divide a file into several parts
d
date Display or change the date & time
dc Desk Calculator
dd Convert and copy a file, clone disks
declare Declare variable & set attributes •
defaults Set preferences, show hidden files
df Display free disk space
diff Display the differences between two files
diff3 Show differences among three files
dig DNS lookup
dirname Convert a full pathname to just a path
dirs Display list of remembered directories •
diskutil Disk utilities Format, Verify, Repair
https://ss64.com/osx/ 1/5
12/16/2017 An A-Z Index of the Apple macOS command line - SS64 Command line reference
disown Unbind a job from the current login session •
ditto Copy files and folders
( SS64 ) Links Syntax Search
dot_clean Remove dotunderscore files
drutil Interact with CD/DVD burners
dscacheutil Query or flush the Directory Service/DNS cache
An A-Z Index of the Apple macOS command line
dseditgroup Edit, create, manipulate, or delete groups
dsenableroot Enable root access
afconvert Audio File Convert
dsmemberutil View user and groups rights
afinfo Audio File Info
dscl Directory Service command line utility
afplay Audio File Play
du Estimate file space usage
airport Manage Apple AirPort
e
alias Create an alias •
echo Display text on screen •
alloc List used and free memory
ed A lineoriented text editor (edlin)
apropos Search the whatis database for strings
enable Enable and disable builtin shell commands •
asr Apple Software Restore
env List or Set environment variables
atsutil Font registration system utility
eval Evaluate several commands/arguments •
awk Find and Replace text within file(s)
exec Execute a command •
b
exit Exit the shell •
basename Convert a full pathname to just a filename
execsnoop Snoop new process execution
bash BourneAgain SHell
expand Convert tabs to spaces
bg Send to background •
expect Programmed dialogue with interactive programs
bind Set or display readline key and function bindings •
Also see AppleScript
bless Set volume bootability and startup disk options
export Set an environment variable •
break Exit from a For, While, Until or Select loop •
expr Evaluate expressions
builtin Execute a shell builtin •
f
bzip2 Compress or decompress files
false Do nothing, unsuccessfully
c
fc Fix command (history)
caffeinate Prevent the system from sleeping
fdisk Partition table manipulator for Darwin UFS/HFS/DOS
cal Display a calendar
fdesetup FileVault configuration, list FileVault users
calendar Reminder Service
fg Send job to foreground •
caller Return the context of a subroutine call •
file Determine file type
cancel Cancel print jobs
find Search for files that meet a desired criteria
case Conditionally perform a command •
fmt Reformat paragraph text
cat Concatenate and print (display) the content of files
fold Wrap text to fit a specified width
cd Change Directory •
for Loop command •
chflags Change a file or folder's flags
fsck Filesystem consistency check and repair
chgrp Change group ownership
fsaclctl Filesystem enable/disable ACL support
chmod Change access permissions
fs_usage Filesystem usage (process/pathname)
chown Change file owner and group
ftp Internet file transfer program
chroot Run a command with a different root directory
function Define Function Macros
cksum Print CRC checksum and byte counts
fuser List processes that have one or more files open
clear Clear terminal screen
g
cmp Compare two files
GetFileInfo Get attributes of HFS+ files
comm Compare two sorted files line by line
getopt Parse positional parameters
command Run a command (not a function) •
getopts Parse positional parameters •
complete Edit a command completion [word/pattern/list] •
goto Jump to label and continue execution
continue Resume the next iteration of a loop •
grep Search file(s) for lines that match a given pattern
cp Copy one or more files to another location
groups Print group names a user is in
cron Daemon to execute scheduled commands
gzip Compress or decompress files
crontab Schedule a command to run at a later date/time
h
csplit Split a file into contextdetermined pieces
halt Stop and restart the operating system
csrutil Configure System Integrity Protection (SIP)
hash Refresh the cached/remembered location of commands •
curl Transfer data from or to a server
head Display the first lines of a file
cut Divide a file into several parts
hdiutil Manipulate iso disk images
d
history Command History •
date Display or change the date & time
hostname Print or set system name
dc Desk Calculator
i
dd Convert and copy a file, clone disks
iconv Convert the character set of a file
declare Declare variable & set attributes •
id Print user and group names/id's
defaults Set preferences, show hidden files
if Conditionally perform a command •
df Display free disk space
ifconfig Configure network interface parameters
diff Display the differences between two files
iostat Report CPU and i/o statistics
diff3 Show differences among three files
ipconfig View and control IP configuration state
dig DNS lookup
info Help info
dirname Convert a full pathname to just a path
install Copy files and set attributes
dirs Display list of remembered directories •
iosnoop Snoop I/O events as they occur
diskutil Disk utilities Format, Verify, Repair
https://ss64.com/osx/ 1/5
2/5
12/16/2017 An A-Z Index of the Apple macOS command line - SS64 Command line reference
j
jobs List active jobs •
( SS64 ) Links Syntax Search
join Join lines on a common field
k
kextfind List kernel extensions
An A-Z Index of the Apple macOS command line
kextstat Display status of loaded kernel extensions (kexts)
kextunload Terminate driver instances and unload kernel extensions.
afconvert Audio File Convert
kickstart Configure Apple Remote Desktop
afinfo Audio File Info
kill Kill a process by specifying its PID
afplay Audio File Play
killall Kill processes by name
airport Manage Apple AirPort
l
alias Create an alias •
l List files in long format (ls l)
alloc List used and free memory
last Indicate last logins of users and ttys
apropos Search the whatis database for strings
launchctl Load or unload daemons/agents
asr Apple Software Restore
ll List files in long format, showing invisible files (ls la)
atsutil Font registration system utility
less Display output one screen at a time
awk Find and Replace text within file(s)
let Evaluate expression •
b
lipo Convert a universal binary
basename Convert a full pathname to just a filename
ln Make links between files (hard links, symbolic links)
bash BourneAgain SHell
local Set a local (function) variable •
bg Send to background •
locate Find files
bind Set or display readline key and function bindings •
logname Print current login name
bless Set volume bootability and startup disk options
login log into the computer
break Exit from a For, While, Until or Select loop •
logout Exit a login shell (bye) •
builtin Execute a shell builtin •
look Display lines beginning with a given string
bzip2 Compress or decompress files
lp Print files
c
lpr Print files
caffeinate Prevent the system from sleeping
lprm Remove jobs from the print queue
cal Display a calendar
lpstat Printer status information
calendar Reminder Service
ls List information about file(s)
caller Return the context of a subroutine call •
lsregister Reset the Launch Services database
cancel Cancel print jobs
lsbom List a bill of materials file
case Conditionally perform a command •
lsof List open files
cat Concatenate and print (display) the content of files
m
cd Change Directory •
man Help manual
chflags Change a file or folder's flags
mdfind Spotlight search
chgrp Change group ownership
mdutil Manage Spotlight metadata store
chmod Change access permissions
mkdir Create new folder(s)
chown Change file owner and group
mkfifo Make FIFOs (named pipes)
chroot Run a command with a different root directory
more Display output one screen at a time
cksum Print CRC checksum and byte counts
mount Mount a file system
clear Clear terminal screen
mv Move or rename files or directories
cmp Compare two files
n
comm Compare two sorted files line by line
nano Simple text editor
command Run a command (not a function) •
nc/netcat Read and write data across networks
complete Edit a command completion [word/pattern/list] •
net Manage network resources
continue Resume the next iteration of a loop •
netstat Show network status
cp Copy one or more files to another location
networksetup Network and System Preferences
cron Daemon to execute scheduled commands
nice Set the priority of a command
crontab Schedule a command to run at a later date/time
nohup Run a command immune to hangups
csplit Split a file into contextdetermined pieces
ntfs.util NTFS file system utility
csrutil Configure System Integrity Protection (SIP)
o
curl Transfer data from or to a server
onintr Control the action of a shell interrupt
cut Divide a file into several parts
open Open a file/folder/URL/Application
d
opensnoop Snoop file opens as they occur
date Display or change the date & time
osacompile Compile Applescript
dc Desk Calculator
osascript Execute AppleScript
dd Convert and copy a file, clone disks
p
declare Declare variable & set attributes •
passwd Modify a user password
defaults Set preferences, show hidden files
paste Merge lines of files
df Display free disk space
pbcopy Copy data to the clipboard
diff Display the differences between two files
pbpaste Paste data from the Clipboard
diff3 Show differences among three files
pgrep List processes by a full or partial name
dig DNS lookup
ping Test a network connection
dirname Convert a full pathname to just a path
pkill Kill processes by a full or partial name
dirs Display list of remembered directories •
pkgbuild Build a macOS Installer component package
diskutil Disk utilities Format, Verify, Repair
https://ss64.com/osx/ 1/5
3/5
12/16/2017 An A-Z Index of the Apple macOS command line - SS64 Command line reference
pkgutil Query and manipulate installed packages
plutil Property list utility
( SS64 ) Links Syntax Search
pmset Power Management settings
popd Restore the previous value of the current directory •
pr Convert text files for printing
An A-Z Index of the Apple macOS command line
printenv List environment variables
printf Format and print data •
afconvert Audio File Convert
ps Process status
afinfo Audio File Info
pushd Save and then change the current directory
afplay Audio File Play
pwd Print Working Directory •
airport Manage Apple AirPort
q
alias Create an alias •
quota Display disk usage and limits
alloc List used and free memory
r
apropos Search the whatis database for strings
rcp Copy files between machines
asr Apple Software Restore
read Read one line from standard input •
atsutil Font registration system utility
readonly Mark a variable or function as readonly •
awk Find and Replace text within file(s)
reboot Stop and restart the system
b
ReportCrash Enable/Disable crash reporting
basename Convert a full pathname to just a filename
return Exit a function •
bash BourneAgain SHell
rev Reverse lines of a file
bg Send to background •
rm Remove files
bind Set or display readline key and function bindings •
rmdir Remove folder(s)
bless Set volume bootability and startup disk options
rpm Remote Package Manager
break Exit from a For, While, Until or Select loop •
rsync Remote file copy Sync file tree
builtin Execute a shell builtin •
s
bzip2 Compress or decompress files
say Convert text to audible speech
c
screen Multiplex terminal, run remote shells via ssh
caffeinate Prevent the system from sleeping
screencapture Capture screen image to file or disk
cal Display a calendar
scselect Switch between network locations
calendar Reminder Service
scutil Manage system configuration parameters
caller Return the context of a subroutine call •
sdiff Merge two files interactively
cancel Cancel print jobs
security Administer Keychains, keys, certificates and the Security framework
case Conditionally perform a command •
sed Stream Editor
cat Concatenate and print (display) the content of files
select Generate a list of items •
cd Change Directory •
serverinfo Server information
chflags Change a file or folder's flags
set Set a shell variable = value •
chgrp Change group ownership
setfile Set attributes of HFS+ files
chmod Change access permissions
sharing Create share points for afp, ftp and smb services
chown Change file owner and group
shasum Print or Check SHA Checksums
chroot Run a command with a different root directory
shift Shift positional parameters •
cksum Print CRC checksum and byte counts
shopt Set shell options •
clear Clear terminal screen
shutdown Shutdown or restart macOS
cmp Compare two files
sips Scriptable image processing system
comm Compare two sorted files line by line
sleep Delay for a specified time
command Run a command (not a function) •
softwareupdate System software update tool
complete Edit a command completion [word/pattern/list] •
sort Sort text files
continue Resume the next iteration of a loop •
source Execute commands from a file •
cp Copy one or more files to another location
spctl Security assessment policy/Gatekeeper
cron Daemon to execute scheduled commands
split Split a file into fixedsize pieces
crontab Schedule a command to run at a later date/time
srm Securely remove files or directories
csplit Split a file into contextdetermined pieces
stat Display the status of a file
csrutil Configure System Integrity Protection (SIP)
stop Stop a job or process
curl Transfer data from or to a server
su Substitute user identity
cut Divide a file into several parts
sudo Execute a command as another user
d
sum Print a checksum for a file
date Display or change the date & time
suspend Suspend execution of this shell •
dc Desk Calculator
sw_vers Print macOS operating system version
dd Convert and copy a file, clone disks
system_profiler Report system configuration
declare Declare variable & set attributes •
systemsetup Computer and display system settings
defaults Set preferences, show hidden files
t
df Display free disk space
tail Output the last part of files
diff Display the differences between two files
tar Tape ARchiver
diff3 Show differences among three files
tccutil Manage the privacy database
dig DNS lookup
tcpdump Dump traffic on a network
dirname Convert a full pathname to just a path
tee Redirect output to multiple files
dirs Display list of remembered directories •
test Condition evaluation •
diskutil Disk utilities Format, Verify, Repair
https://ss64.com/osx/ 1/5
4/5
12/16/2017 An A-Z Index of the Apple macOS command line - SS64 Command line reference
textutil Manipulate text files in various formats (Doc,html,rtf)
time Measure Program Resource Use
( SS64 ) Links Syntax Search
times Print shell & shell process times •
tmutil Time Machine utility
top Display process information
An A-Z Index of the Apple macOS command line
touch Change file timestamps
tput Set terminaldependent capabilities, color, position
afconvert Audio File Convert
tr Translate, squeeze, and/or delete characters
afinfo Audio File Info
trap Execute a command when the shell receives a signal •
afplay Audio File Play
traceroute Trace Route to Host
airport Manage Apple AirPort
true Do nothing, successfully
alias Create an alias •
tty Print filename of terminal on stdin
alloc List used and free memory
type Describe a command •
apropos Search the whatis database for strings
u
asr Apple Software Restore
ufs.util Mount/unmount UFS file system
atsutil Font registration system utility
ulimit limit the use of systemwide resources •
awk Find and Replace text within file(s)
umask Users file creation mask
b
umount Unmount a device
basename Convert a full pathname to just a filename
unalias Remove an alias •
bash BourneAgain SHell
uname Print system information
bg Send to background •
unexpand Convert spaces to tabs
bind Set or display readline key and function bindings •
uniq Uniquify files
bless Set volume bootability and startup disk options
units Convert units from one scale to another
break Exit from a For, While, Until or Select loop •
unset Remove variable or function names •
builtin Execute a shell builtin •
until Loop command •
bzip2 Compress or decompress files
uptime Show how long system has been running
c
users Print login names of users currently logged in
caffeinate Prevent the system from sleeping
uuencode Encode a binary file
cal Display a calendar
uudecode Decode a file created by uuencode
calendar Reminder Service
uuidgen Generate a Unique ID (UUID/GUID)
caller Return the context of a subroutine call •
uucp Unix to Unix copy
cancel Cancel print jobs
v
case Conditionally perform a command •
vi Text Editor
cat Concatenate and print (display) the content of files
w
cd Change Directory •
wait Wait for a process to complete •
chflags Change a file or folder's flags
wall Write a message to users
chgrp Change group ownership
wc Print byte, word, and line counts
chmod Change access permissions
whatis Search the whatis database for complete words
chown Change file owner and group
whereis Locate a program
chroot Run a command with a different root directory
which Locate a program file in the user's path
cksum Print CRC checksum and byte counts
while Loop command •
clear Clear terminal screen
who Print all usernames currently logged on
cmp Compare two files
whoami Print the current user id and name (`id un')
comm Compare two sorted files line by line
write Send a message to another user
command Run a command (not a function) •
x
complete Edit a command completion [word/pattern/list] •
xargs Execute utility passing arguments
continue Resume the next iteration of a loop •
xattr Display and manipulate extended attributes
cp Copy one or more files to another location
xcodeselect install Install the command line developer tools
cron Daemon to execute scheduled commands
youtubedl Download video
crontab Schedule a command to run at a later date/time
yes Print a string until interrupted
csplit Split a file into contextdetermined pieces
zip Package and compress (archive) files.
csrutil Configure System Integrity Protection (SIP)
!! Run the last command again
curl Transfer data from or to a server
cut Divide a file into several parts
Commands
d marked • are bash built-in commands. bash is the default shell, it runs under Darwin the open source core of
macOS.
date Display or change the date & time
dc Desk Calculator
macOS Man Pages - Apple Developer Connection
dd Convert and copy a file, clone disks
Discussion forum
declare Declare variable & set attributes •
Links to other Sites, Books etc...
defaults Set preferences, show hidden files
df Display free disk space
“Mac OS X is a rock-solid system that's beautifully designed. I much prefer it to Linux” - Bill Joy
diff Display the differences between two files
diff3 Show differences among three files
dig DNS lookup Copyright © SS64.com 1999-2017
dirname Convert a full pathname to just a path Some rights reserved
dirs Display list of remembered directories •
diskutil Disk utilities Format, Verify, Repair
https://ss64.com/osx/ 1/5
5/5