The Terminal app on Mac is equivalent to the Command Prompt on Windows.
The Terminal provides the command line interface to Mac.
So, if you need to run a few commands to perform advanced administrative functions on your Mac, here is how to open the Command Prompt window or Terminal on Mac.
Also Read: How to connect Beats to Mac.
How to Open and Use Terminal on Mac?
To open and use the Mac command line tool, follow the methods explained below.
1) Use Spotlight Search To Open the Terminal
Opening the Terminal through Spotlight search is the quickest and easiest way.
Here are the steps below to launch Terminal using Spotlight search:
- Click on the search icon from the Menubar, or alternatively, you can press Command + Space to open Spotlight.
- Type “Terminal.app” or “Terminal” and hit Return.
- This should open the Terminal app. Once it is open, you can start typing the commands.
2) Open Terminal Using Launchpad
If you have Launchpad in your Dock, you can easily open Terminal using that.
The Dock is a panel of icons located mainly at the bottom of your Mac screen. However, it can be moved to the right or left.
Now, follow these steps to open the Terminal using Launchpad:
- Either press F4 or click on the silver-colored rocket-like or multicolored icon on your Dock to open the Launchpad.
- Choose to open the “Other” folder with many smaller icons.
- Once Launchpad opens, type “Terminal” in the search bar, hit Return, or select the Terminal app from the search result.
- Now the Terminal should open.
3) Launch Terminal Through Finder
You can also open the Terminal app from your Application Folder. Here is how to open it:
- Click on the two-toned smiling face at the Dock to open Finder.
- From the Menu bar, select Go > Applications.
- Once the applications folder opens, scroll down and select Utilities.
- Double-click on Utilities to open it.
- Inside that, you will find the Terminal app. Now, double-click on the Terminal app to open it.
4) Launch Terminal Using Siri
Here is how to launch Terminal using Siri:
- Go to the Menubar and click on the Siri button. Alternatively, you can launch Siri from the Applications Folder.
- Use the microphone to say Open Terminal, which should launch the Terminal app. Yes, it is that simple!
Create a Terminal Shortcut
For quick access to the Terminal app, you can keep it on your Dock. Here is how to do it:
- Right-click on the Terminal icon from the Dock and select Options > Keep in Dock.
- Next time you need to run commands in Terminal, just click on the Terminal Dock icon, and you are ready to go!
How to Quit Terminal?
If you want to quit Terminal, here is what to do:
- In the Terminal app, select Terminal > Quit Terminal.
If you want to quit a shell session, then here is what to do:
- In the window that’s running a shell process, type exit. Then hit Enter.
- This should close the commands running in the shell.
Some Rules To Use Terminal On Mac
Each character and space matters while running a command on the Command prompt window.
So, be careful while entering any command in the Mac Terminal or any other command line tool.
Also Read: How long do Macbooks last?
So, make sure to copy and paste or type the proper Command along with Space and characters.
On Mac, you need to press the Return key instead of the Enter key on Windows.
In Terminal, you will have to use the arrow keys to navigate as you cannot use your trackpad or mouse here.
If you need to re-run a particular command, use the arrow key to reach the Command and press the Return button. While running the Command, press the Control + C keys if you want to interrupt.
To specify a location in your Command, open Finder and go to the specific file. Then, drag that file or folder into the Terminal.
You can also type cd and then enter the directory path to specify the folder where you wish to run a command.
Some of the basic commands that you can use in Terminal
Here is a list of some basic commands to run in the Terminal windows in Mac:
cd: Change directory.
ls: List the contents of a directory.
mkdir: Create a new directory.
rmdir: Delete a directory.
touch: Create a new file.
cat: Display the contents of a file.
grep: Search for the pattern in a file.
man: View the manual page for a command.
Frequently Asked Questions [FAQs]
- How to open a text file in CMD on Mac?
To open a text file in CMD on Mac, open Terminal, type the editor’s name followed by a space, and type the name of the specific file.
To create a new file, type the name of the editor, followed by a space and the pathname of the particular file.
- What is CMD R in Mac?
CMD R key combination in Mac is used to reinstall the latest MacOS version installed on your system or for using other apps in the MacOS Recovery.
- How to update Mac CMD?
To update MacOS and the system applications to the latest version, use the following Command in the Terminal: sudo softwareupdate -i -a -R.
So, there you have it! That is how you should open Terminal or Command Prompt in Mac.
If you face any difficulty performing the above steps, write to us in the comments section below, and we shall revert ASAP.