Use Terminal to Speed up Mountain Lion

11/19/2012 11:39:04 AM

Make your Mac go taster, with a little help from Terminal.

If you’ve tried everything else and still want to make your Mac run faster, roll up your sleeves, crack your knuckles and prepare to take on a challenge. The Terminal is your direct portal to OS X’s kernel. There are no menus or tick Poxes to negotiate here. We’re back to old-school computing, setting up configuration options at the command prompt. Scary? not really.

Description: Description: Description: Use Terminal to speed up Mountain Lion
Use Terminal to speed up Mountain Lion

In many cases, you can access features you won’t find anywhere else in the system. In others, it’s faster to tap out a quick command than negotiate your way through obscure control panels, menus and dialogue boxes.

If you’ve never used the Terminal before, you’ll find it in the Utilities folder in Applications. It’s easier still to find in Launchpad, in the Utilities group. Once you open it, you’ll be faced with a blinking cursor, a blank window and a lot of possibilities. To cut-and-paste these commands, see

Warning: These commands are pretty straightforward, but we always recommend you back up your Mac before delving into Terminal.

1.    Turn off the Dashboard

Description: Description: Description: Turn off the Dashboard
Turn off the Dashboard

You can turn off Dashboard widgets so they don’t use CPU cycles even when they’re not active. Type the command:

-defaults write mcx-disabled

-boolean YES

-killall Dock

2.    Bring it back

Description: Description: Description: Bring it back
Bring it back

If you find that you’re really missing your widgets, use the command:

-defaults write mcx-disabled

-boolean NO

killall Dock

The ‘killall’ command at the end resets the Dock, by the way.

3.    2D Dock

Description: Description: Description: 2D Dock
2D Dock

To squeeze every Nanosecond of speed out of your Mac, you can revert to the old-style 2D Dock. Use the command:

-defaults write no-glass

-boolean YES

killall Dock

To reverse the process, replace ‘YES’ with 'NO’

4.    Disable automatic window animations

Description: Description: Description: Disable automatic window animations
Disable automatic window animations

It takes a fraction of a tick for windows to animate when you open and close them. A portion of a second you can claw back with:

defaults write NSGlobalDomain


-bool NO

Replace ‘NO’ with ‘YES’ will bring your animations back.

5.    Rebuild your Font Cache

Description: Description: D:\!Work\!60s\!Publish\01-06.11\HTML\Tech_Desktop_Use_Terminal_to_Speed_up_Mountain_Lion_files\image006.png
Rebuild your Font Cache

If you install and delete lots of different fonts, then your Font Cache can become corrupt and sluggish over time. You can clear and rebuild the Font Cache at start-up by issuing the following command:

atsutil databases -remove

Replace ‘-remove’ with ‘-removeUser’ to only clear the current user’s cache.

6.    Switch screenshot format

Description: Description: Description: Switch screenshot format
Switch screenshot format

If you use the shortcut keys to take screenshots (^-Shift-3) - the default file type is png. You can change it by entering: defaults write type jpg Your Mac also supports bmp, tif and gif - all you need to do is swap ‘jpg’ for one of those.

7.    Add ‘Quit Finder’

Description: Description: Description: Add ‘Quit Finder’
Add ‘Quit Finder’

Wouldn’t it be nice to be able to get out of system slowdown by rebooting the Finder? Enter this command at the Terminal: defaults write QuitMenuItem -bool YES kill all Finder

You can now simply choose ‘Quit Finder’ from the Finder menu.

8.    Plain emails

Description: Description: Description: Plain emails
Plain emails

Set all mails to display with plain text in the preview pane by entering this at the Terminal: defaults write PreferPlainText -bool TRUE

Restart Mail and HTML has gone. Revert by replacing ‘TRUE’ with ‘FALSE’.

9.    Recent applications

Description: Description: Description: Recent applications
Recent applications

This command creates a Dock Stack that lists the last few apps used, defaults write persistent-others -array-add ‘{ “tile-data” = { “list-type” = 1; }; “tile-type” = “recents-tile”; }’

Don’t forget to refresh the Dock using killall Dock.

10.  Empty Trash

Description: Description: D:\!Work\!60s\!Publish\01-06.11\HTML\Tech_Desktop_Use_Terminal_to_Speed_up_Mountain_Lion_files\image011.jpg
Empty Trash

You know when you empty Trash and OS X asks you whether you really want to empty it, wasting valuable pizza-eating time? This command will let you delete files without OS X nagging you about it: defaults write WarnOnEmptyTrash -bool false

11.  Run maintenance scripts

Description: Description: Description: Run maintenance scripts
Run maintenance scripts

OS X is highly optimized, running its own clean-up routines on a scheduled basis. But it does no harm to run these manually though. Use:

sudo periodic daily weekly monthly

You’ll be prompted to enter your password and all maintenance scripts will run straight away.

12.  Autocomplete

Description: Description: D:\!Work\!60s\!Publish\01-06.11\HTML\Tech_Desktop_Use_Terminal_to_Speed_up_Mountain_Lion_files\image013.jpg

To finish off, here are a few tips that make using the Terminal a bit faster. Firstly, want to complete paths quickly when typing in the terminal? Hit Tab and OS X does it for you. An even quicker way to add full paths to commands is to drag and drop folders from the Finder directly into the Terminal window.

13.  Terminal anywhere

Description: Description: Description: Terminal anywhere
Terminal anywhere

You can add a command to the contextual menu that opens the Terminal at the folder you’re currently navigating in the Finder.

Open System Preferences and click on Keyboard. Choose the Keyboard Shortcuts tab and Select ‘Services’. You’ll see a full list of add-on commands.

14.  Use the menu

Description: Description: Description: Use the menu
Use the menu

Drill down the list to the ‘New Terminal at Folder’ entry and tick the box to switch the feature on. Now, right-click within any folder in the Finder and you’ll see the command at the bottom of the contextual menu. Select it and the Terminal will pop up with the folder you want to work in ready to access.

15.  Look it up

Description: Description: Description: Look it up
Look it up

You know that OS X is built over a kernel derived from UNIX, right? That means many standard UNIX commands work in the OS X Terminal. The easiest way to find out what a command does and how it works is to use the built-in manual, invoked with ‘man’. In Mountain Lion, you can right-click and open the man page for any highlighted command that bit more quickly.

Bonus tip: terminal replacement

When is Terminal not Terminal?

When it’s a Terminal replacement.

Total Terminal (free; is one of the leaders. Previously known as Visor, Total Terminal slides into view when you hit a shortcut. It doesn’t replace the OS X Terminal. Rather, the plugin adds features to your Mac’s terminal.apps - like color-coding, ‘copy on select’ and ‘paste on right-click’.

Then there’s iTerm2 (free; - a full replacement for Terminal that focuses on better performance and extra features. Those include a split-screen interface, mouse less copying, built-in search and a 256-colour interface. If you’re serious about unlocking the power of your Mac with Terminal commands, either app is worth the download.

Most View
Master Black-White Copying
SharePoint 2010 : The Search User Interface - The Query Box
Canon EOS-1 DX (Part 1)
Why Tape Remains Relevant
10 Things You Need To Know About Privacy
100 Ways To Speed Up Windows (Part 2)
The Best Overlocked PCs On The Market (Part 2)
Silverlight : Converting Values During Data Binding
Take It To The Limit (Part 3)
Huawei Ascend W1 Review - Promising But Flawed (Part 2)
Top 10
The Mercedes-Benz S350 CDI – The King Sips Diesel
The Jaguar XFR – Big Bang Theory (Part 2)
The Jaguar XFR – Big Bang Theory (Part 1)
The BMW I8 – Green Hornet (Part 2)
The BMW I8 – Green Hornet (Part 1)
The Lamborghini Huracan – Amazing Supercar
LaFerrari – One Of The Most Anticipated Cars Of 2014 (part 2)
LaFerrari – One Of The Most Anticipated Cars Of 2014 (part 1)
BMW 1 Series M Coupé - Global Hyper Colour (Part 2)
BMW 1 Series M Coupé - Global Hyper Colour (Part 1)