When we think of the macOS user interface, we think of the graphical UI—pointing and clicking icons, with a cursor, menus, windows, etc. But there’s another UI built into macOS: the command-line interface, which involves typing commands like the days of old. It can be a more efficient way of using your Mac—instead of pointing, clicking, dragging, and opening and closing windows, you can type in commands that provide more direct access.
The way to access the Mac’s command line is through the Terminal app, which is located in the Utilities folder inside Applications. We have several articles about the Terminal and the command line—click on a link below to help you learn how to use them. We’ll add more articles to this index as they appear on the site, so check back for new content.
Access the command manual
The key to learning about macOS’s command line is manual (or
man) pages. Here’s an introduction.
Navigate files and directories
This article covers the basics functions of the
ls (list) and
cd (change directory) commands. Learn how to see the contents of a folder (which is called a directory in command-line speak), and how to use switches to get more out of the
Compare the contents of two folders
diff command to quickly compare the contents of two folders. Learn how.
Delete files and directories
Find out how the
rm command allows you to delete files and the
rmdir command is used to delete directories (folders).
Copy and move files and folders
Learn how to use the
cp (copy) and
mv (move) commands for the following tasks:
- How to copy or move a file to a different directory
- How to copy or move a directory
- How to copy or move multiple files or directories
- How to rename a file
- How to create a directory
Fix Terminal typos
It’s bound to happen: you make a mistake typing in a command in the Terminal. Fortunately, there’s a way to fix the error without having to type the whole command over again. Learn how.
Type less by using Terminal shortcuts
Save lots of time and type less by using the command history functions.
Look at your command history list
You can check to see what commands are in your history at any time by running the history command. Here’s how.
Change the window background color and image
Learn how to make Terminal use a user-defined background image each time you open a new window.
Activate key repetition
You can use the Terminal to disable macOS’s character palette and restore key repeating.
Securely erase free space on a Mac’s drive
Learn how to use Terminal to securely erase free drive space.
See what Mac processes are accessing the internet
If you’ve ever wondered about which programs are using your internet connection at any point in time, here’s one way to find out using Terminal.
Play audio files
Learn how to play, convert, and get info on audio files using some macOS Terminal commands.
Use Quick Look
Quick Look—select an item in the Finder and press the Space Bar to preview it—is available when you’re using the Terminal. Here’s how to use it.
Make the macOS Dock super small
If the Size slider in the Dock preferences pane doesn’t go small enough for you, here’s a trick that will.
Check your Intel and M1 Mac’s SSD health using Terminal
Follow our step-by-step guide to get important stats on the viability of your Mac’s SSD using Terminal and smartmontools.
Roman has covered technology since the early 1990s. His career started at MacUser, and he’s worked for MacAddict, Mac|Life, and TechTV.