5 Quick Mac OS Terminal commands to make a Mac user life easier

Terminal is the command line interface to control unix based operating systems such as macOS and the most useful feature for an intermediate mac user to modify settings or preferences that usually cannot be done with normal GUI.

If you are new to terminal and don’t know where to start, please read this article and get to know terminal first

Ok, now back to some quick tips:

1.  Change screenshot file type.

Macs, by default saves screenshots as png file while are generally bigger in file size. If you would like to save as BMP,GIF,JPG or PDF format, you can change the default setting by using terminal. Open terminal app and type in the command below:

defaults write com.apple.screencapture type -string "png"

change where it says png to whichever extension you wish to us

2.  Change default screenshot save location

I’ve seen a lot of people just saving things on Desktop and end up with clutter. By deafult, mac saves all screenshots to Desktop location and it makes it difficult to find the file. By changing the default location to different folder, you can easily look for your saved screenshots. Open terminal and type the command below.

defaults write com.apple.screencapture location /folderlocation

Just swap out where it says /folderlocation to path of your preference. For example, i created folder called Screenshots on my Desktop, so i would replace /folderlocation with /Users/username/Desktop/Screenshots

3.  Show all hidden files and folder

Mac OS are really good at hiding system and core library file which sometimes you will need access to do some troubleshooting. To make all hidden files and folders visible in finder, use the command below in terminal

defaults write com.apple.finder AppleShowAllFiles -bool true

If you only want to unhide specific folders, use command below and specify the location of folder. For instance, i would like to unhide the main Library folder only, then i’ll use the command below

chflags nohidden ~/Library/

4.  Keep your Mac from falling asleep

Feed you mac some strong starbucks caffeine and make it stay awake as long your want. In Terminal, use the command caffeinate and make your mac drink some strong coffee. For example, if i want my mac to stay awake for 20,000 secs, i would type:

caffeinate -t 20000

5. Check your macs uptime

Lots of issues can be easily solved by a quick troubleshoot step called “restarting” your mac. If your mac has been up for long time and running bit sluggish, it might be sign that it needs a quick reboot. To check how long the mac has been up, run a quick command in terminal by typing uptime in terminal window