Still, if you’re curious, this article shows you how to open Terminal on Mac and use basic commands.
What Is Terminal?
Terminal is an emulator providing a command-line interface. It’s similar to PowerShell in Microsoft Windows, which replaced Command Prompt (MS-DOS) in 2017. macOS is based on the Unix operating system originally built by AT&T for the Bell System. Terminal uses the Bash shell by default.
A “shell” is another word for interface, whether it’s text-based or full of graphics. Since Terminal emulates the command-line environment, the shell creates the visual interface within the emulation. For macOS, the default shell is Bash (Bourne-Again Shell), though you can switch to Z Shell (or zsh) using a command.
Everything you see in macOS stems from a graphical user interface. Rather than enter commands, you have windows managed by a mouse and keyboard. Touchscreens, gestures, digital pens, and more make interactions even easier. Why bother typing commands into an old-school interface?
The simple explanation is you can do anything using commands, like change the default storage location for your screenshots, play games, make the Mac talk, show hidden folders, and more. More importantly, commands are faster because they’re direct.
The GUI generating all the macOS windows and menus, however, targets ease and simplicity, not speed. While you’re dragging a file from window to window, using a command line to perform the same move may be quicker.
How to Open Terminal
Terminal typically resides on the Dock. The icon resembles a command-line input screen with a white > (greater than) symbol set against a black background.
You can also access the Terminal app through the Launchpad.
Click the “rocket” icon located on the Dock. This opens the MacOS Launchpad. Click the Other folder. Click the Terminal app.
Command Basics
Here are a few basic command-line starters. They’re action words like copy, move, and list. Some of these aren’t used in the examples below. Instead, this list merely illustrates how commands begin.
cat – List the contents of a file or foldercd – like DOS, use this command to change directoriescp – Copy a file or folderdefaults – This command changes settings not listed under Preferencesls – this command lists a directory’s contentmkdir – Make a directorymv – Move a file or foldernano – Open the Terminal editorssh – short for Secure Shell, this command creates a secure encrypted connection between two hosts. sudo – upgrades your command with administrative (superuser) privileges and requires a password. Be careful, however, as incorrect commands could damage macOS and require a fresh install.
Commands to Get You Started
Here are fun and useful commands to get you started. These include keeping your Mac awake, watching an ASCII version of Star Wars Episode IV, and a few others.
View the Contents of a File or Directory
This is handy if you want to see the contents of a ZIP file or executable before it’s unpacked. Insert your file or folder location after the ~ (tilde) symbol.
Increase Update Frequency
The number at the end represents the number of days the Mac will wait to check for updates. MacOS typically checks once a week, so the default number is 7 at the end. In this example, the Mac will check once a day.
Keep your Mac Awake
Since your Mac can’t drink coffee, the next best way to keep it awake is to feed it a caffeinated command. This will force it to remain awake indefinitely.
To stop, type the CTRL + C keys.
If you want to keep your Mac awake for a specific time, use the following example. Here we chose 250,000 seconds (which is not quite three days for those who are curious).
Watch a Text Version of Star Wars: A New Hope
This is just fun. You may not sit through the whole show, but it’s amazing to see this classic film portrayed using an animated ASCII format like you’re in the early 1980s.
Change the Screenshot Format
PNG is the default format. Use this command to save screenshots in JPG, GIF, or another file format.
Change the Default Screenshot Name
MacOS saves screenshots with the date and time listed in the file name. Use this command to create a default file name that’s not so ugly and long.
Change the Screenshot Save Destination
Screenshots save to the desktop by default. Use this command to change the target storage location, like a dedicated folder.
Press the Enter key.
Remove the Screenshot Drop Shadow
If you take screenshots of an open window using the Command + Shift + 4 + Spacebar command, MacOS adds a drop shadow when you click on that window. If you don’t want this effect, use the following command:
To reenable the effect, type this command:
Chime Like an iPhone Connecting to Power
Here’s a little command-line fun for iPhone owners.
To disable the chime, type the following and press the Enter key:
Make your Mac speak
This serves no purpose other than to entertain children with the Mac’s mechanical voice. You do not need the quotation marks in the command. (Be sure the replace the sentence in quotation marks with whatever you want the computer to speak.)
Download Files from the Internet
Don’t want to download files using a browser? Take this route instead.
Press the Enter key and enter this command. The press the Enter key again once you’ve entered the command.