Get some seriously powerful control over your Mac with Terminal – here’s how to use it
Part of becoming a Mac power user is learning how to gain fine control over your Mac and how it works. There are plenty of third-party tools on the market that help you do this, but really, most of them act as a prettier interface for the most powerful tool of them all – Terminal.
Lurking away in the Utilities folder of your Applications, Terminal may look a little unassuming, but once you understand how to construct and input commands, it becomes the best way to make changes to how your system works. Terminal commands have some seriously farreaching implications, from hiding system software like Spotlight to changing the look and feel of Finder, all the way through to playing a full, ASCII art version of Star Wars Episode IV.
As a word of warning, Terminal is extremely powerful and certain commands, particular Super User (sudo) commands, can have a very quick and very permanent effect on your machine, so approach with caution! Don’t shy away from Terminal, though. Despite the risks, it can still be a hugely useful tool for any Mac power user.
Application name
Generally speaking, most Terminal commands will reference the name of the application they’re affecting using the system: com. PUBLISHER.APPNAME – in this case, the Terminal command is affecting Finder and is preceded by the command type defaults write
Kill ‘em all
Often, after entering a command, you’ll need to restart the app it affects. To do this, a simple killall [NAME OF APP] is all you need. It’s also useful for relaunching Finder if you’re experiencing issues
Display option
In this case, the Terminal command is changing whether anything is displayed on the desktop or not, so it’s telling Finder to change the CreateDesktop tool – this option usually always follows the application
Boolean options
Most defaults write terminal commands end with -bool and either true or false. This enables or disables the option that’s been specified earlier in the command – if you’ve enabled an option and want to disable it, just change true to false
Six commands to get you started
Hide your desktop icons To get rid of all that desktop clutter (the computing equivalent of sweeping everything under the rug) type defaults write com.apple. finder CreateDesktop -bool false and restart Finder. Switch out false for true to undo.
Convert Word documents
To quickly convert a Word document from .docx to .doc for easy sharing, simply type textutil -convert doc /path/to/filename.docx (you can usually find the path to your file name in Finder). It’s a very simple fix.
Refresh Launchpad
For when Launchpad has a tendency to fall out of sync with the apps on your Mac, type in rm ~/Library/Application\ Support/Dock/*.db ; killall Dock to have it all refresh. Things should fall back into place.
Enhance iTunes
To add a ‘now playing’ pop-up to your iTunes’ Dock icon, simply use the command defaults write com.apple.dock itunes-notifications -bool TRUE ; killall Dock to enable a somewhat hidden iTunes feature and keep you updated
Enable AirDrop over Ethernet
If you’re in a work environment, your Mac may be connecting to the internet via Ethernet rather than Wi-Fi, stopping AirDrop from working. To fix this, use the command: defaults write com. apple.NetworkBrowser BrowseAllInterfaces 1.
Unhide your Library folder
Your Mac’s Library folder is hidden by default, but if you’re a power user who needs to access it regularly from your menu bar, this is easily fixed with the quick Terminal command: chflags nohidden ~/Library/.