As sufficient as macOS already is, it has another special feature that lets you act quickly—the Terminal app. If you have never heard or opened this app before, Terminal is an effective tool that can help you complete a wide range of tasks. Like Command Prompt in Microsoft Windows, it is the command line interface for Mac. We will give you a step-by-step instruction on how to use it.
How to Open Terminal
Terminal is not located at the most obvious place on your Mac, and maybe that’s one of the reasons you have never seen it before. Here are three ways to open Terminal:
Open with LaunchPad
1. Go to the “Other” folder.
- Click Terminal. The Terminal application will start and open a command prompt window.
Open with Spotlight
- On the top right corner of the screen, click the magnifying glass icon to open Spotlight Search. You may also press the Command + Space key simultaneously on the keyboard to open “Spotlight”.
- Type terminal in the search bar. The Terminal program will appear in the search results.
- Double-click on Terminal. The Terminal application will launch, and a window will open.
Open with Finder
- Open Finder. Click on the application that is on the left panel of the Finder window.
- Tap Go at the top of the screen and select an app if you don’t see “Apps.”
- Click Utilities. You may need to swipe the list to find it.
- Scroll down and find the “Terminal” program. Double-click it to start it and go through the whole process.
Common Terminal Commands
There are many things you can do with the Terminal. Just remember these commonly used commands — they can help you get familiar with how Terminal works.
To execute any command on Terminal, simply type the command on the command line and press Return. You also need to press Return if there are more than one line of command. When you copy the command, pay attention to the spaces and the correct capitalization. These details are crucial for the command to work successfully.
Use Terminal to show hidden files
To display hidden files, enter the following command in the Terminal:
defaults write com.apple.dock showhidden -bool true && \
To restore hidden files, enter the following command in the Terminal:
defaults write com.apple.dock showhidden -bool false && \
Copy Files to Another Folder
Terminal can help you batch move files from one folder to another. Use this command:
ditto [Folder 1] [Folder 2]
Replace “Folder 1” with the folder that your files originally located at, and replace “Folder 2” for the target folder you want to put the files in. Note that all files from the original folder will move to the target folder. If you want to check what files are being moved, add -v at the end of the command.
Remove the shadow of the window screenshot
To take a screenshot of a specific opened window, you can use this shortcut:
Command ⌘ + Shift + 4, then the sp.
You will find, however, the window screenshot is surrounded by a circle of a shadow. You can remove it and enter the following command in the terminal if you do not like it.
defaults write com.apple.screencapture disable-shadow -bool true && \
To restore the window shadow, enter the following command in the terminal:
defaults write com.apple.screencapture disable-shadow -bool false && \
Change the save location of screenshots
You can change the default location of the screenshot and save it to any place you want. When entering the following command, replace Desktop with your desired folder.
defaults write com.apple.screencapture location ~/Desktop && \
You can use Terminal to control the closing and opening of the notification bar on the right side of the desktop.
launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist &&
killall -9 NotificationCenter
Open notification (default)：
launchctl load -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist
Instead of opening App Store and check the available software updates, you can simply type in this command line in Terminal:
sudo softwareupdate -l
Use the following command to install all updates in one click:
sudo softwareupdate -ia
System integrity protection
System Integrity Protection restricts the root user account and limits the actions that the root user can perform on protected parts of the Mac operating system. It is a technology developed by Apple to help prevent potentially malicious software from modifying protected files and folders on your Mac.
Disable system integrity protection and restart by pressing Command ⌘ + R, open the terminal application, and enter:
csrutil disable && reboot
To enable system integrity protection and reboot: press and hold Command ⌘+ R, open the terminal application, and enter:
csrutil enable && reboot
How to Exit Terminal
Click the Terminal window that is running the command you want to terminate.
Press the CTRL + C key to terminate commands currently running in Terminal.
Use optimization software
Terminal is great for quick and easy tasks and organizing all your files. However, you still have to enter the commands manually, which also requires great accuracy. Cleaner One Pro is a great alternative for file organization, freeing up space and performance improvement. It is an all-in-one Mac optimization tool, and offers live monitoring for your Mac’s performance.
Cleaner One Pro features some powerful but easy to use functions, such as Smart Scan, Junk Files and Similar Photos. You can manage all your files and batch remove them easily. With just a few clicks, you will have a faster Mac.