Some Useful Mac OS X Terminal Commands

Feb 19, 2015, by admin

Here are some useful Mac OS X Terminal commands that bring you more change and comfort in your working with Mac.

Terminal copy

1. Customize OS X ‘s look and feel

People love to do this. This can change the look of the dock, the scroll bars and even it can make you to see hidden files. If you don’t like the dock being in the center of the screen. You can move it by typing a simple command in terminal:

defaults write com.apple.dock pinning -string end

killall Dock

Even you wish to move the dock to the top or back the default one, just replace the word end at the start or middle instead

2. Last Login

This command lets you know who has logged in to your system and how long they have used it.

Type in terminal window

last

3. Power management

Type in terminal window. The following command will show you the overview or current power management setting.

pmset -g

This will make your computer to sleep after 15 minutes of inactivity

sudo pmset displaysleep 15

And following command will put the computer to sleep after 30 minutes of inactivity

sudo pmset sleep 30

4. Change the backup periods

Time machine backs up every hour when its connected but this can be changed with the help of the terminal. Type the following command in terminal

sudo defaults write /System/Library/Launch Daemons/com.apple.backupd-auto StartInterval -int 1800

This makes time machine back up now after every thirty minutes. And if you want to change that time you can replace 1800 with 900. So 15 minutes would be your backup time.

5.Make Your Mac Speak

This command is itself explained what it can do for you. You can trigger the native text to voice function word ‘say’ as:

say your-statement-here

This is a unique command that can bring you more in operating a Mac OS X.

6. Software update

It’s a quick way to install software updates. To use it, open the terminal window and type

softwareupdate -i –a

and if wish to install only than type

recommended

7. Recently Used Apps

This command lets you access your recently used apps. Open your terminal and type the following command

defaults write com.apple.dock persistent-others -array-add ‘{ “tile-data” = { “list-type” = 1; }; “tile-type” = “recents-tile”; }‘; killall Dock

8. X-raying Your Folder

It gives you a quick look at any file, show you the folder size and number of files in it.

Type the following command:

defaults write com.apple.finder QLEnableXRayFolders -boolean YES; killall Dock

To disable, enter the following command:

defaults write com.apple.finder QLEnableXRayFolders -boolean FALSE; killall Dock

9. Add Widgets to Your Desktop

Apple has no problem in keeping widgets in the OS x dashboard. But if you like to use them on your dashboard type the following command:

defaults write com.apple.dashboard devmode YES

To reverse the process just changes the Yes with no command.

10. Enable 2D Dock

To enable 2D dock on your Mac type in your terminal

defaults write com.apple.dock no-glass -bool true

If you want to go back to 3D dock change the word true with false.