LATEST NEWS

Our Thoughts About Software Design And Development

Mac Terminal Commands One should try

Mac Terminal is almost like Windows Command Prompt. It allows users to modify various characteristics of their Mac systems, fonts, files and functions. It is a program that takes in commands for your computer to run. Using Mac terminal, just enter the command and hit ‘Return’ to execute.

How to Open Terminal On Mac?

Terminal allows you to access the UNIX part of mac OS. So you can run scripts, manage files and edit settings using text commands. To launch the Terminal application, we can use Launchpad, Spotlight or Finder.

Launchpad

Click on the silver rocket Launchpad icon > Click on ‘Other’ folder > Click on ‘Terminal’ app to launch the command prompt of Mac.

Spotlight

Open the magnifying glass Spotlight icon in the dock or you can use shortcut cmd + space bar. Type ‘Terminal’ into the search box > Terminal will appear in the search results, click it & proceed with the command prompt.

 

Finder

Finder organizes your files, folder, apps, documents and helps you to locate when you misplace them. Once it’s opened, locate ‘Applications’ folder in the left panel. Now, click on ‘Utilities’ & scroll down to find ‘Terminal app > Double-click to launch it. 

Basic Utilities You Will Use On A Regular Basis

How To Use Terminal On Mac?

A command consists of three elements:
  • The command itself which calls a particular tool.
  • An option which modifies the output.
  • An argument which calls the resource on which the command will operate.
So, for an instance if you want to move a file from one place to another, you would use the command move “mv” followed by the file and location where you want to move. You need to enter the command.
mv ~/Desktop/MyFolder /Volumes/Backup

Here are 10 Mac Terminal Commands:

Want to See Hidden Files/Folders

Enter the following command to see hidden stuffs:

defaults write com.apple.finder AppleShowAllFiles -bool TRUE
killall Finder

 

Download Files Without Using Browser

Terminal can help in downloading files when you don’t want to use web browsers. If you have the URL of the file you wish to download, just enter the following commands.

First Command: Set the Location

cd ~/Downloads/

Second Command: Download File

curl -O (Enter the URL of the file you want to download)

Keep your Mac Awake

Just use the command and specify an elapsed period of time you want your system to be active!

Run: caffeinate – u – t 5400 (5400 are the number of seconds) 

Ditto

The most popular command used in OS X is Ditto.  It’s helps in copying huge amount of data from one folder to another.

Ditto – v / Old Folder / New Folder

At the place of ‘old folder’ and ‘new folder’ you have to add the paths of the source and destination of the files. You can see each file in the terminal window as they’re copied from one place to another. 

Change Location for Screenshots

If you don’t want your system to save screenshots on your Desktop, you can change its location using terminal application. To do so, run the following commands:
  • Type: defaults write com.apple.screencapture location (path of the  folder where you want screenshots to be saved)
  • Click Return
  • Type: killall SystemUIServer

Change Screenshot File Format

Using this Mac command line, you can change the default PNG format into PDF, JPEG and more. In the following example we’re changing the default format to PDF.

Execute the following command: defaults write com.apple.screencapture type PDF

To revert the changes, run the same command again and type PNG in place of PDF. 

Make your Mac to Automatically Restart After a Crash

The following command can help you to reboot your system automatically.

Type: sudo systemsetup – setrestartfreeze on

Securely Erase Data

Whenever you delete data from your system, it leaves fragments of files all over your hard disk drive. In case you want to safely remove all the remaining fragments, then you can execute the coming command.

diskutil secureErase freespace 3 / volumes / name-of-drive

At place of ‘name-of-drive’ you have to type the name of the drive you want to erase data from. terminal

We are here and happy to help!

Email

We will get back to you as soon as possible.

SEND EMAIL

Live Chat

Speak online with our awesome client support.

CHAT NOW

Call

Monday to Friday From 8am to 8pm IST.

+91 9555960648

Support Videos

Watch our online video and start quickly.

WATCH NOW

Have a question? Our team is here to help