Terminal on Mac – Things You Must Know
macOS, besides its appealing interface and top-tier optimization, is very popular for its wide range of useful native applications. Each in-built macOS application facilitates users to perform specific tasks with ease.
For instance, with the help of the Finder utility, users can easily find and manage any digital files stored on their Macs. Besides Finder, the in-built Photos application allows users to open, edit, and manage pictures seamlessly.
Another fine example of such a utility or tool is the Terminal app. This article will cover what the Terminal app is, how users can access it, and highlight some of the most important tasks users can perform using it. Let us start:
What is Terminal?
The Terminal is a built-in macOS application that allows users to interact with their computer via the Command Line Interface (CLI). Network admins and advanced users use this tool to perform tasks that the Graphical User Interface (GUI) cannot manage.
Users must know their way around commands to utilize the tool to the best of their abilities. Let us elaborate with an example. To move a file or folder in macOS using Terminal, the user needs to enter the correct command to complete the task smoothly.
Like most other native macOS apps, Terminal delivers exceptional performance in most cases. However, there are times when it presents problems. One of the most common ones is the “xcrun: error.” Fortunately, there are multiple ways to solve the issue. For example, users can reinstall the command line tools to resolve it. Besides this, they can install CLT manually from the Apple Developer download page. To know more, visit https://setapp.com/how-to/fix-xcrun-error.
How to Use Terminal To Perform Specific Tasks:
The Terminal utility is capable of performing numerous tasks. Here are some things any macOS user can do using the powerful CLI-based tool:
- Download Files Directly
To specify the desired location as the place for storing the downloaded files, users need to input “cd -/Downloads/.” Once the download location has been set, users simply need to begin the download process by entering “curl -O {the file’s URL}.
- Find Hidden Files and Folders
Like all other major operating systems, macOS also offers users the option to hide files and folders to enhance their data’s privacy and security. However, there are times when users forget where they hid them. Fortunately, users can easily reveal the location of all hidden files and folders using the Terminal utility.
To get the job done, users simply need to launch the Terminal application on their Mac and input the given command:
“defaults write com.apple.finder AppleShowAllFiles -bool TRUE
Killall Finder”
After entering the command, users need to press the “Return” key to reveal all files present in a specific location, including hidden ones.
- Prevent Mac from Sleeping
The majority of Mac users, especially those who own MacBooks, depend on macOS’ sleep option to save battery. Users may sometimes need their MacBook to stay awake even when not in use. There are two ways to do this: adjust the sleep timer manually in the “Power” settings or use the Terminal utility.
Since the second method requires lesser effort, most users prefer it over the manual way.To prevent a Mac from sleeping, open the Terminal app and enter “caffeinate -u -t [number of seconds]”. Press the “Return” key to confirm. Doing so will command the device to remain awake or on for the desired period.
- Shut Down or Restart Mac
Although the generic way of shutting down a Mac is not very complicated, users can get the job done easily using the Terminal utility. To shut down their Mac, users simply need to open the Terminal app and enter “$ sudo shutdown -h now.”
Besides this, users can also restart their Macs without hassle in the same way. However, instead of entering the shutdown command, users need to type “$ sudo shutdown -r now” and press the “Enter” key. Doing so will instantly make the Mac shut down and turn on again.
Besides the aforementioned tasks, the Terminal utility is capable of getting numerous other things done. If you are a macOS user and wish to use your Apple computer to the best of its capabilities, it would be best to learn and use Terminal for performing complex tasks.
Leave a Reply