Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Best Mac Terminal Tricks and Commands to Know

Decades back, GUI was a distant dream for almost every computing device out there. Users had to take some commands by heart when it came to using a PC or Macintosh device. The case was same when you wanted to do a simple calculation or when it came to moving a file from one folder to another. Then came Apple Lisa that brought intuitive windows and cursor system into computers.

Since then, everything has been so easy, but for some reason, almost every OS still keeps space for Command Prompts and Terminals. If you are using Windows, you will be familiar with the Command Prompt, which is used for performing certain tasks. As we come to macOS, however, its counterpart is named the Terminal. It is not mandatory that you should know how to use macOS terminal.

Mac Terminal Tricks

Nevertheless, there are a few instances when Mac terminal is quite useful. Obviously, you can find some of terminal tricks and tips too. In this article, we have created a list of the best terminal tricks and commands to know. Personally speaking, I find these commands useful once in a while; we hope they help you too.

Accessing Terminal in Mac                                                                            

The easiest way to access terminal in Mac is by using the Spotlight Search. Just press Cmd+Space and enter the term, ‘Terminal’ in the search bar. In a second, you can see the terminal interface that resembles photo that we’ve given below.

Access Terminal in Mac

Now that you have opened and seen the terminal, we’ll move onto the tips and tricks, right?

#1 Stop your Mac from Automated Sleep – Keep it Awake

If you are someone who runs some applications all the time, you wouldn’t want the Mac to go to sleep. My idea was to go to Energy Saver Preferences and turn the Sleep feature off. However, using a terminal, it’s just a command away. You can use the following Mac terminal command to make sure that your Mac never goes to sleep again.

caffeinate

Just type the command in terminal and hit the Enter button. Instantly, your Mac becomes sleepless. It’s an awesome feature if you want to keep your Mac running almost every time. This is a useful command if you like to leave your Mac with some serious background tasks.

#2 Know the Uptime of your Mac

In most days, I don’t really shut down my Mac device. In fact, I don’t even remember when I shut down the Mac for the last time. That having said, it’s necessary that you should shut down and restart your Mac once in a while. To know how long your Mac has been running without being turned off, you can use the following terminal command.

uptime

Just press Enter and you can see the total uptime of your Mac so far. It needs to be noted that the time won’t be affected by charging cycles or anything. In my case, it’s been several days, as you can see.

Mac Uptime

#3 Manage Your Screenshots

Do you know that Mac comes with an inbuilt utility for capturing screenshots? It lets you capture shots from full screen, a specific area or a specific window. Due to the default settings, however, the screenshots will be saved in .PNG format, and in the Desktop folder. Chances are, you may want to customize it in the long run.

To change the format of the saved screenshot, you can use the following command.

            defaults write com.apple.screencapture type jpg

Depending on the requirement, you can replace jpg with other formats too. It’s a useful feature if you want to get less space-consuming screenshots from your Mac.

To change the location where screenshots are automatically saved, there’s another command. You can paste your desired location in the respective place.

            defaults write com.apple.screencapture location ~/Users/abhijithnarjunan/Desktop/Screenshots

After you enter the above mentioned command, paste the following one. It will refresh the System UI Server and save the

killall SystemUIServer

In the very next second, the setting will be changed. From now on, the captured screenshots will be saved in the provided location, in .JPG format.

#4 Hiding a File/Folder from Finder

In Mac, you don’t need a third-party app for making a folder hidden. Goes without saying, it’s a cool feature if you have something confidential and don’t want others to see it. There are a couple of terminal commands to hide and unhide certain files and folder.

Hiding File in Mac

To hide a particular folder from your Finder interface, use the following command. Of course, you will have to replace the directory name with that of the folder you need to hide.

            Chflags hidden /Users/abhijithnarjunan/Desktop/Docs

Hit the Return button and the folder would disappear from the Finder window or Desktop. Make sure that you can recall the directory name. if you can’t keep it somewhere safe.

To bring the folder back into Finder, there’s another command to be used. Just paste the following one.

            Chflags nohidden /Users/abhijithnarjunan/Desktop/Docs

Instantly, you can see the folder appearing back.

#5 Customizing your Dock

Did you know that you can customize the design of your Mac dock using Terminal? In fact, you can, and all it requires is a bunch of commands. We will some of them here.

Suppose you have a wide variety of app icons on the dock. You may want to rearrange the dock with respect to the category of apps. You can insert a space into the dock that will help you in the classification process. To do that, you can paste the following command into the Terminal window.

            defaults write com.apple.dock persistent-apps -array-add ‘{“tile-type”=”spacer-tile”;}’

killall Dock

It’s a command for inserting a single space. You can repeat this command as many times as you like and get as many spaces on the dock. These spaces can be dragged and managed with ease.

Wrapping Up – Mac Terminal Tricks

These are the superb Mac Terminal Tricks and commands we use on a regular basis. Indeed, they have been found to be super-cool in the long run. Also, it’s a great thing if we can use the native options rather than 3rd party apps. For instance, I’d go for the folder-hiding feature of Mac instead of installing another app in my device. We hope you will find these 5 Mac tricks to be helpful in the maximum form.

The post Best Mac Terminal Tricks and Commands to Know appeared first on TechLila.



This post first appeared on TechLila • Tutorials Related To Technology, Wind, please read the originial post: here

Share the post

Best Mac Terminal Tricks and Commands to Know

×

Subscribe to Techlila • Tutorials Related To Technology, Wind

Get updates delivered right to your inbox!

Thank you for your subscription

×