10 of the Best Defaults Write Commands to Improve Mac OS X
Most Mac OS X preferences are managed through easily accessible control panels, but going behind the scenes with defaults write commands can lead to some genuinely useful tweaks that can only be made through the command line. This list represents a compilation of some of the best defaults write commands out there, and even if you’re not an advanced user you’ll find some of these tricks to be well worth your while.
10 Best defaults write Commands for Improving Mac OS
To get started, launch Terminal from Spotlight or the /Applications/Utilities/ directory and just copy and paste the string into the command line.
Remember, all defaults write commands belong on the same line when executed, and many of these will automatically restart a service, like the Dock, when used.
Remove the Auto-Hide Dock Delay
For those of us who hide our Docks, there is a very short delay when going to the bottom of the screen to reveal it. It may not be too noticeable at first, but removing the Dock delay makes that delay obvious, resulting in your Mac actually feeling faster.
defaults write com.apple.Dock autohide-delay -float 0 && killall Dock
Speed Up Mission Control Animations
This is another tip that makes your Mac feel faster, just by reducing the length of Mission Control animation speeds.
defaults write com.apple.dock expose-animation-duration -float 0.12 && killall Dock
Make Hidden App Icons Translucent in the Dock
Hiding open apps has long been a useful feature of Mac OS, but by default there’s no easy way to tell what’s hidden and what’s not. Thankfully, a simple command enables translucency for hidden apps, making them easy to tell apart from the rest:
defaults write com.apple.Dock showhidden -bool YES && killall Dock
Stop Full Names from Copying with Email Addresses in Mac OS X Mail
For whatever reason when you copy an email address in Mac OS X Mail app, the persons full name gets attached along with it. This means when you go to paste you get the persons name with the email rather than just the email address. Annoying, but this can be turned off with a defaults write command:
defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false
Enable Text Selection in Quick Look Windows
Quick Look is one of the most useful aspects of Mac OS X, and being able to select text from the windows seems like a no brainer, so here’s how to enable it:
defaults write com.apple.finder QLEnableTextSelection -bool TRUE;killall Finder
Always Show Hidden Files in the Finder
Hidden files are, unsurprisingly, hidden by default in the Mac OS X Finder. This is easy to change to always have hidden files visible, though it’s probably most applicable to advanced users.
defaults write com.apple.finder AppleShowAllFiles -bool YES && killall Finder
Hide Desktop Icons Completely
If your desktop quickly ends up as a clutter of files on top of files, hiding all icons from the desktop provides instant relief and makes for a minimalist onscreen experience. The files are still accessible through the Finder in the Desktop folder, you just won’t see them covering your wallpaper all the time.
defaults write com.apple.finder CreateDesktop -bool false && killall Finder
Show System Info at the Login Screen
With this enabled, you can see some basic system info from the login screen, including MacOS X system version, hostname, and more, by clicking the clock at the login window. Most useful for sysadmins and power users.
sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName
Change Where Screen Shots Are Saved To
If you take a lot of screenshots you know how fast your desktop gets littered with them. The best solution is to create a new folder in /Pictures/ or ~/Documents/ and then set that to the new default screen shot save location with a defaults write command:
defaults write com.apple.screencapture location ~/Pictures/Screenshots
Change the Default Screen Shot Image Type
Speaking of screen shots, you can change the default file type from PNG to JPG or a variety of other options with a defaults write command. JPG offers the best file size and compression while still looking decent:
defaults write com.apple.screencapture type jpg && killall SystemUIServer
Bonus: Always Show the User Library Folder
A simple command lets the user ~/Library always be shown. This isn’t a defaults write command but it’s very useful if you frequently dig around in that directory, and you may as well make the change while you’re in the terminal.
chflags nohidden ~/Library/
Most of these commands will be usable in all versions of Mac OS X, though obviously things that require something like Mission Control is only going to work in later MacOS versions that support those features.
Did we miss any essential defaults write commands? Let us know in the comments.