10 fun and useful commands for Terminal in OS X

The terminal is a powerful tool for OS X. You give your computer commands, and the operating system performs them dutifully. Using the terminal, you can perform actions that much more difficult or impossible to perform using graphical user interface. However, the terminal cannot be called friendly tool for common users. Many shun it in fear to give the wrong command, and to deal with unforeseen consequences. In this article you will find a selection of simple and even funny teams from which to start exploring the terminal.

Checking the response from the server

The Ping command allows you to check the availability of domain or IP address. You can also see how quickly the answer will be given from the server. Try to check, how fast you get a response from “www.appleinisder.ru”. For this purpose there is a very simple command:

ping www.appleinsider.ru

Disable shadow in screenshots

If you make a screenshot of the window in OS X, by default it is created with shadow. You can disable the shadow in screenshots with a simple command:

defaults write com.apple.screencapture disable-shadow-bool TRUE

After it type:

killall SystemUIServer

This command will force the changes to take effect. If you want to re-enable the shadows in the screenshots, just perform the same operation by replacing the command “TRUE” to “FALSE”.

Show hidden files in Finder

In order in the Finder started to show all hidden files, just type in the terminal:

defaults write com.apple.finder AppleShowAllFiles -bool TRUE

To apply changes you must restart the Finder. For this you can use the command:

killall Finder

All hidden files will be shown. Again want to hide them? Repeat the same operation by replacing the command “TRUE” to “FALSE”.

Make your Mac speak

With a simple command you can force your computer to speak any phrase. Try typing:

say the terminal says hi

Make your Mac to forgo sleep

If you need to avoid falling asleep on your computer, it is very simple to do with the help of the terminal. Type:


You can also specify the time that the Mac needs to work without sleep, in seconds:

caffeinate -t 150000

You can prematurely cancel the command with Ctrl+C.

View the history commands in the terminal

To remember all that you have entrusted the terminal, type:


Want to clear the command history? Type:


The stress test

The stress test will create a process to “yes” and point to execute all the power of the processor. We discussed the benefits of this team recently. To do a stress test just:

yes > /dev/null &

To complete the process with the command:

killall yes

Enable sound charger connection from iOS

Typically the Mac is silent when connected to the charger. If you want to turn up the volume on this is similar to what makes your iPhone. It is enabled with the following command:

defaults write com.apple.PowerChime ChimeOnAllHardware -bool TRUE; open /System/Library/CoreServices/PowerChime.app &

To disable this sound, use the command:

defaults write com.apple.PowerChime ChimeOnAllHardware -bool FALSE; killall PowerChime

To check OS X updates more frequently

Your computer itself checks for updates of the system. If you want to check more often than he does, you can check manually, or you can just ask OS X to check for updates often using the terminal. Want weekly instead of daily check include? There is the following command:

defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1

As you can guess, to go back to a weekly check, use the command:

defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 7

Put screen saver as Wallpaper

If you’re in a strange mood and it’s so unusual that you want to temporarily use a screen saver instead of the Wallpaper on your Mac, try the command:

/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background

Once you close the Terminal or press Ctrl+C, you will return to your normal Wallpaper.

According to the materials of iDownloadBlog

Clifton Nichols

Clifton Nichols

Hi! I’m Clifton and I am a full-stack engineer with a passion for building performant and scalable applications that are beautiful and easy to use.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *