MacOS terminal tips and tricks. Imagemagick is a multifunctional tool that can be used to convert one image format to another (e.g. It can also be used to add borders. Speed Up Your Mac with Purge and Activity Monitor. If your Mac is running slowly, you may need to free up some space. You can easily do this by opening Finder and choosing Applications Utilities Terminal. Once there, type “sudo purge” to free up around 500 MB of memory space and get your Mac back on track. If you’re not, the Terminal is an application included in every version of OS X into the Utilities folder which provides a command line interface to manually control your Mac. In this roundup I’ve collected the best links about Terminal.app: you’ll find the best commands, hacks and tips to get the most out of it.

  1. Mac Os Terminal Tricks
  2. Mac Terminal Tricks
  3. Macos Terminal Hacks

At the Terminal prompt, enter the following command (it’s easiest to just copy & paste these commands), then press Return: defaults write com.apple.dock showhidden -bool TRUE; killall Dock You can see the hidden app effect on the Google Chrome and Mail app icons in the image below. 4 basic Terminal Mac shortcuts Command (⌘) + T is used in order to open a new terminal window. Command (⌘) + N is used in order to open a new tab in the terminal. Command (⌘) + Shift + and Command (⌘) + Shift + are used to switch tabs back and forth.

Terminal is one of the most powerful macOS apps, which allows you to perform actions with different commands. Although Terminal Commands are seemingly difficult to carry out, believe me, they aren’t. Once you know the commands, you can quickly perform tasks like shutting down your Mac or copying contents from one place to another right from your terminal

As the terminal is a CLI (Command Line Interface), the language we type in which interacts with the Mac, is known as bash, and commands are called bash commands. This tool is often overlooked because it is completely different from the GUI (Graphical User Interface ), which provides a rich interface. But today I’ve come up with a useful list of macOS Terminal Commands that you can learn easily and will help you do things instantly. So let’s start.

11 Cool Terminal Commands for macOS – Mac User Should Try

#1. Hide/Unhide and View Files/Folders in Finder

macOS Terminal provides you an easy way to Hide, Unhide or View hidden files in the Finder via Terminal.

Open up the terminal from /Applications/finder or alternatively launch it from Spotlight.

To Hide any File/Folder:

Type in the following command :

Now, drag the file which you want to hide in the terminal and click Enter.

To View Hidden File/Folder:

Type defaults write com.apple.finder AppleShowAllFiles -bool TRUE in the Terminal.

Once done you need to restart the Finder, it can be done by this command.

If you ever wish to hide the sensitive files again, repeat all the commands by replacing TRUE with FALSE.

To Unhide any File/Folder:

Unhiding the file/folder is fairly easy, just replace “hidden” with “nohidden”.

Now, drag the file/folder which you want to unhide.

Mac Terminal Tricks And Hackstagever

#2. Download Files Using Terminal

If you’ve a direct link of the file which you want to download, you can use the following commands to download the file using the Terminal on Mac.

Note: If you want to download the contents to any other directory replace “downloads” with the directory name.

#3. Keep your Mac Awake

To prevent the mac from sleep, or showing screensaver after some inactivity use

If you want this command to get auto-disabled after a certain period of time, put the -t flag and specify the time in seconds as shown below.

Here, after 150000 seconds the command will get disabled, and the settings will be restored. Meanwhile, you can also use Cmd + C to terminate the command.

#4. Change Default Screenshot Format Type

By default, the screenshots are saved in .PNG format, but you can gain full control over the screenshots behavior.

To change default screenshot format type, use defaults write com.apple.screencapture type followed by type for e.g. : ( PNG, JPG, GIF, or PDF), then press Enter.

#5. Access iCloud Drive Using Terminal

To access the data from your iCloud Drive use the following command.

However, we already have a detailed guide on how you can access, copy, or move data to your iCloud Drive, which you can check out anytime.

#6. Shut Down or Restart Mac using Terminal

Tricks

To shut down your mac with CLI (Command Line Interface) aka Terminal, use

Just as shut down, you can restart your Mac by

#7. View File Contents

To access the contents of any damaged or corrupted file, you can force the terminal to open it with this command.

Note: If you try to open an image file in the terminal, it will show some gibberish text.

#8. Speed Up Time Machine Backup

Mac Os Terminal Tricks

Whenever you’re updating the Mac to the new version, backup’s are assurity of your data and the easiest way to take a backup is to use Time Machine. But do you know? You can speed up time machine backup using the terminal by this command

#9. Add Spaces to your Dock

If you feel, your dock is crowded with a lot of apps. You can add up a little space between each app icon, here’s how.

Type:

and hit Return.

Once done, type:

and press Return again

#10. Copy Contents from One Folder to Another

Copying contents from one place to another is fairly easy with Terminal, Type in the following command

Replace original with the current directory, and new with the name of the directory to which you want to copy the contents.

#11. Make your Mac Say Anything you want

This is the coolest command that macOS provides, you can make your Mac say anything you want, by using the say command followed by the words.

say “hello, iGeeksblog”

Wrapping Up…

There are lots of bash commands available for macOS. However, these were some of them. Do give them a try, and make more out of your Mac.

You might also like to read:

Which command did you like the most? Share your views in the comment section.

Nikhil runs iGB’s official YouTube channel. He is the official lensman of iGB and GB’s small studio is Nikhil’s playground, where he does all wonders with his remarkable signature. When Nikhil is not in his studio, you may spot him in a gourmet restaurant, chomping his way through some delicious food. He is a great traveler, who can go for long drives in search of good food.

  • https://www.igeeksblog.com/author/nikhil/
    How to Manage Website Settings in iOS 13 Safari on iPhone and iPad
  • https://www.igeeksblog.com/author/nikhil/
    How to Fix 'iMessage Needs to Be Enabled to Send This Message' Issue
  • https://www.igeeksblog.com/author/nikhil/
  • https://www.igeeksblog.com/author/nikhil/
    How to Enable and Use Taptic Time on Apple Watch in watchOS 6

Terminal is not for mere mortals, you're probably thinking. It's a kind of a sacred knowledge that only geeks and Mac geniuses possess. But if you get through your first command line you'll find it's not that terrifying. In fact, using Terminal is like applying Harry Potter wizardry to your tasks. Once you know the right spells you can break any laws of how applications behave and do some unbelievable things that even the most experienced Mac people can't. Isn't it seducing to try?

We've chosen just a few of Terminal's most impressive features. For more serious take on Mac terminal commands, check out this article. Okay, are you ready to type in your first code? To start the journey, learn how to open Terminal app on Mac: Click Launchpad and then type Terminal in the search bar.

1) Make your Mac talk to you

One of the simplest commands which can be very fun, especially when you are planning a prank on somebody. Just type any text in Terminal and your computer will speak it in your Mac's default voice. But there's about 20 voices and intonations to choose from plus the ability to convert an entire text file into speech. So here's a slick audiobook maker at your hand.

Open up Terminal, type in:
say followed by a space and any text you want to hear

2) Customize Login Message

This is what makes Mac more personal and humanized. For example, you can write an inspirational motto or helpful information for other users, if it's a public library computer. It might even be a way to retrieve your MacBook if you lose it — if you set a login message with your contact information. Once again there's much room for pranking other people, but we won't go deep into that.

Open up Terminal, type in:

sudo write /Library/Preferences/com.apple.loginwindow LoginwindowText 'Custom Text Here'

3) Watch Star Wars in Terminal app

In Terminal symbols, of course. This could be the greatest trick which makes no particular sense, but even if just for the coolness alone you should try it. The Death Star, R2D2, spaceships and the rest of the Episode 4 story retold in Terminal graphics will blow your friends away at the party. And there is no sound by the way.

Open up Terminal, type in:
telnet towel.blinkenlights.nl
On macOS Sierra and higher macOS versions, you should use a different command:

nc towel.blinkenlights.nl 23

4) Show hidden files in Finder

This isn't as funny as the previous one, but searching for important files is no joke. With this command, you'll be able to see everything on your Mac, even files which were omitted from standard display.

Open up Terminal, type in:

Mac terminal tricks

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

This should summon Finder with previously hidden files shown grayed out.
To reverse this operation (be aware that you may be swamped with lots of irrelevant system files) just substitute TRUE for FALSE in the command line above:

defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder

5) Pay a visit to a psychiatrist

Funny Mac terminal commands are many. This is a classic Easter egg type of joke macOS developers are famous for. When you're feeling stressful, talking to friendly chatbot will at least make you smile. Strangely enough, this therapy may be actually working because you are asked to verbalize your emotions, by giving them a closer look. And the psychiatrists (the real ones) will confirm that sometimes it works.

Open up Terminal, type in:
emacs and then hit Return. Press Esc, then x, and finally type doctor

6) See iTunes songs notification via Terminal app

A clever addition if you normally work with the music on the background. If you fell in love with a particular track from your playlist you don't need to open iTunes to find out the artist's name. It will pop up on your Mac Dock from now on. Though a bit strange this feature isn't included by default because it's really a timesaver.

Open up Terminal, type in:

defaults write com.apple.dock itunes-notifications -bool TRUE

Close the dock using the following command:

killall Dock

7) Play simple games

Mac Terminal Tricks

This is another retro cool feature to cheer you up once in a while. You can play Tetris, Pong, Snake and a dozen of other arcade games. Once you have unlocked these nice hidden toys, you'll surely get to love your Mac more. Prepare to use your arrow keys.

Open up Terminal, type in:
emacs. Press Enter to open it up, press Esc then x. Now you have to type the name of the particular game and that's it.
Game names:

  • tetris
  • pong
  • snake
  • solitaire
  • 5x5
  • landmark
  • doctor

What you learn from using Mac Terminal commands is that nothing is really impossible if you're on a Mac. But it's better to start your Terminal experience with these funny little tricks and then go to something serious. This program has a nearly infinite number of magic spells to choose from.

8) Make your Mac faster and more responsive

Okay, this has nothing to do with Terminal. But who wouldn’t want their MacBook as speedy and efficient as back then, on its first day? Surprisingly, this can be achieved easily, Terminal-style way — with aid of CleanMyMac X.

Macos Terminal Hacks

  • Remove up to 74 GB of junk from your Mac
  • Uninstall unwanted apps completely
  • Speed up Mac with maintenance scripts
  • Fully clean browsers and messengers

Download the app from developer’s site for free
Hope you found this article helpful, stay tuned for more!

These might also interest you: