5 Terminal Commands You Will Always Use

5 Terminal Commands You Will Always Use

Ever wanted to get behind the hood of your Mac. Well terminal is a powerful tool provide with every Mac that lets you do some incredible things. Not only can you set your own parameters, it gives you a bit more control. The Terminal commands we will go over today are completely reversible and safe to use. Let’s get started:

To find Terminal, navigate to  Applications > Utilities folder. Click to open Terminal 


Terminal Command

Show Hidden Files & Folders

Showing hidden files and folders in Yosemite and Mavericks

defaults write com.apple.finder AppleShowAllFiles TRUE;killall Finder

Revert Changes & Make files hidden again:

defaults write applefindercom.. AppleShowAllFiles FALSE;killall Finder


Showing hidden files and folders in Snow Leopard, Lion, and Mountain Lion, El Capitan, and MacOs Sierra

defaults write com.apple.Finder AppleShowAllFiles TRUE

Then Enter

killall Finder

To revert Changes & Make files hidden again:

defaults write com.apple.Finder AppleShowAllFiles FALSE

Then Enter

killall Finder

Changing Screenshot File Format

By default screenshots formats are PNG, but you can change it to several others, such as, JPEG, Pdf, GIF, and Tiff. You can change the format type by entering the following into Terminal

defaults write com.apple.screencapture type Jpeg

Then Enter

killall SystemUIServer

To revert the changes, enter the following:

defaults write com.apple.screencapture type PNG

Then Enter

killall SystemUIServer

Shut Down Your Mac Instantly or with a Delay

To shut down your Mac immediately:

sudo shutdown -h now

To restart your Mac immediately:

sudo shutdown -r now

You even add a time delay (in minutes) by adding a + and the number of minutes, for this example we used 30 mins:

sudo shutdown -r +30


Prevent Mac From Going to Sleep

Were you every downloading a file, or how about a video project rendering, and wanted to close the lid and avoid your computer from falling to sleep. Here is the command for you. 


You can come out of caffeinate mode by pressing Ctrl-C in Terminal.

You can also add time parameters

caffeinate -u -t 1200

The number represents seconds, so the above command will keep your Mac from sleeping for 20 minutes. (60sec x 20 number of minutes =   1200 seconds )

Make Your Mac Speech

With this command you can make you mac say anything.

say "Thanks for visiting Unplow"

Leave a Reply