When we think of the macOS user interface, we think of the graphical user interface: point and click on icons, with a cursor, menus, windows, etc. But there is another user interface built into macOS: the command-line interface, where you have to typing like the days of yore. It can be a more efficient way to use your Mac: instead of pointing, clicking, dragging, and opening and closing windows, you can type 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 in Applications. We have several articles on the Terminal and the command line – click on a link below to learn how to use them. We will be adding more articles to this index as they appear on the site, so check back regularly for new content.
Access the command manual
The key to learning about the macOS command line is manual (or
man) Pages. Here’s an introduction.
Navigating files and folders
This article covers the basic functions of the
ls (list) and
cd (change directory) commands. Learn how to see the contents of a folder (called a .) folder speak in command line), 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 directories. Learn how.
Delete files and folders
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:
- Copy or move a file to another folder
- Copy or move a folder
- Copy or move multiple files or folders
- Rename a file
- How do you create a folder?
Fix typos in the terminal
It can happen: You make a mistake when typing a command in the Terminal. Fortunately, there is a way to fix the error without having to retype the entire command. Learn how.
Type Less Using Terminal Shortcuts
Save a lot of time and type less by using the job history features.
Look at your order history list
You can check which commands are in your history at any time by running the history command. Here’s how.
Change the background color and image of the window
Learn how to make Terminal use a user-defined background image every time you open a new window.
Activate key repeat
You can use the Terminal to disable the macOS drawing palette and restore key repeat.
Safely erase free space on a hard drive
Learn how to use Terminal to securely erase free hard drive space (not for SSDs).
See which Mac processes have access to the Internet
If you’ve ever wondered what programs are using your Internet connection at any given time, here’s a way to find out using Terminal.
Play audio files
Learn how to play audio files, convert and get information using some macOS Terminal commands.
Using quick view
Quick view—select an item in the Finder and press the spacebar to view it—available when using the Terminal. Here’s how to use it.
Make the macOS Dock super small
If the Size slider in the Dock’s preference pane isn’t small enough for you, here’s a trick that will.
Check the SSD status of your Intel and M1 Mac with Terminal
Follow our step-by-step guide to key stats about your Mac’s SSD viability using Terminal and smartmontools.