How to speed up Mountain Lion

Make your Mac faster, with Terminal commands that work in Mountain Lion. The command line tool gives you access to hidden features.

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 boxes to negotiate here. We’re back to old school computing, setting up configuration options at the command prompt. Scary? Not really.

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. It’s time to tune up your Mac.

Did you know that Dashboard widgets uses CPU cycles even when they’re not active? To switch off Dashboard widgets – you can switch off the entire Dashboard. Type the command: 

defaults write com.apple.dashboard mcx-disabled -boolean YES

killall Dock

Hit return to make the magic happen.

 

If you find that you’re really missing the calculator or that widget that tells you what the weather’s doing, you can bring back the Dashboard, at the Terminal. Use the command:

defaults write com.apple.dashboard mcx-disabled -boolean NO 

killall Dock

The “killall” command at the end resets the Dock, by the way.

If you’re determined to squeeze every nanosecond of speed out of your Mac, you can sacrifice some of Mountain Lion’s dashing good looks. Reverting to the old style 2D Dock will shave off a sliver or two of time. Use the command:

defaults write com.apple.dock no-glass -boolean YES

killall Dock

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 the following Terminal command:

defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool NO

Replacing “NO” with “YES” will bring your animations back. If you’re using an application, you may need to relaunch it to see the (lack of) effect.

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.

If you use the shortcut keys to take screenshots (CMD+SHIFT+3) – the default filetype is png. You can save yourself some conversion time by changing that default filetype. Terminal comes to the rescue. Enter:

defaults write com.apple.screencapture type jpg

Your Mac also supports bmp, tif and gif – all you need to do is swap “jpg” out for one of those.

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 com.apple.finder QuitMenuItem -bool YES

killall Finder

If your sluggish system hangs frequently, you can now banish with the spinning beach ball by choosing “Quit Finder” from the Finder menu. 

People who send HTML emails – we’re too busy to look at your spam. Set all mails to display with plain text in the preview pane by entering this at the Terminal: 

defaults write com.apple.mail PreferPlainText -bool TRUE

Restart Mail and HTML has gone forever. Unless you revert back, using the same command with “FALSE” instead of “TRUE”.

Wouldn’t it be handy to have quick access to the applications you use the most? This command creates a Stack – a fancy folder in your Dock – that lists the last few applications you used.

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

Don’t forget to refresh the Dock.

You know when you empty the trash and OS X asks you whether you really want to empty the trash, wasting valuable microseconds of pizza-eating time? Use the Terminal to shut OS X up. Use the command:

defaults write com.apple.finder WarnOnEmptyTrash -bool false

Now OS X will let you delete files without nagging you about it.

OS X is highly optimised, running its own cleanup routines on a scheduled basis. It does no harm to run these manually though. Use the command:

sudo periodic daily weekly monthly

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

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.

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.

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.

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.

When is Terminal not Terminal? When it’s a Terminal replacement. TotalTerminal is one of the pack leaders. Previously known as Visor, TotalTerminal slides into view from the menubar (or any part of the screen you choose) when you hit a shortcut. It doesn’t replace the OS X Terminal. Rather, the plugin adds features to your Mac’s terminal.app – like colour coding, copy on select and paste on right-click.

Then there’s iTerm2 – a full replacement for Terminal that focuses on better performance and extra features you won’t find normally in OS X. Those include a split screen interface, mouseless 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.

Note: We may earn a commission when you buy through links on our site, at no extra cost to you. This doesn’t affect our editorial independence. Learn more.