Check out these secret (and super-useful) settings for your Mac

By

JPG screenshot location
Dust off your Terminal to use these great hacks.
Photo: Charlie Sorrel/Cult of Mac

By using commands in your Mac’s built-in Terminal app, you can quickly change settings you probably didn’t even know existed.

Some of these Mac settings are just shortcuts — you can enable them in the usual way, using the mouse. But Terminal makes things simple. Instead of opening the System Preferences app, then finding (or remembering) a setting you want to change, and then searching further until you actually find the right checkbox, you can just type (or paste) a command, then  hit return.

Most of these are secret settings, though. They are impossible to change without Terminal. Let’s check them out.

First things first. Terminal provides a text-based interface to your Mac. Instead of clicking buttons and dragging, you just type instructions for the computer into a text field. If you’re not familiar with this powerful, built-in tool, you should read our post on basic Mac Terminal tricks.

How to use these secret Mac settings

Once you know how to use Terminal, you can use it for many Mac tasks. To change any of the secret Mac settings we mentioned, you can just paste a line of code into the Terminal window and hit Enter. The changes will take effect instantly, with no feedback. You’ll just have to test things to see the results. In most cases, the last word in the command is “true.” To reverse the change, just replace “true” with “false.”1

Other commands offer several options. For instance, the command to pick the image type for screenshots looks like this:

defaults write com.apple.screencapture type -string "png"

To choose a different image format, replace png with one of the following image

suffixes: bmp, gif, jpg, pdf, tiff. Remember to keep the quotes.

Now, here are a bunch of useful settings. You can find all these, and a lot more, on this Github page, maintained by Mathias Bynens.

All commands are copied from the Github page. I have added comments to the less obvious ones.

Expand save panel by default

This one means you’ll never have to expans the save panel manually ever again.

defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true

defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true

Disable automatic termination of inactive apps

MacOS quits apps that you haven’t used in a while, in order to conserve memory and battery power — just like iOS. This setting disables this feature.

defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true

Disable Notification Center and remove the menu bar icon

Beautiful, baby. Keep a nice clean menubar.

launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null

Trackpad: Map bottom right corner to right-click

I have yet to try this, as I use a two-finger tap for right-click. It sounds pretty neat, though.

defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2

defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true

defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClickBehavior -int 1

defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true

Save screenshots to the desktop

defaults write com.apple.screencapture location -string "$\{HOME\}/Desktop"

Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF)

This one is essential.

defaults write com.apple.screencapture type -string "png"

Keep folders on top when sorting by name

Folders are listed first in any Finder window.

defaults write com.apple.finder _FXSortFoldersFirst -bool true

Enable spring loading for directories

Drag a file over a folder, and it’ll pop open after a short delay. Unless…

defaults write NSGlobalDomain com.apple.springing.enabled -bool true

Remove the spring loading delay for directories

This setting removes the delay for popping folders open.

defaults write NSGlobalDomain com.apple.springing.delay -float 0

Show the ~/Library folder

Apple was probably right to hide the user’s Library folder, but for folks who need/want regular access, this unhides it again on older versions of macOS. On Mojave, there’s a setting in the Finder to show the ~/Library folder. Thanks to readers Scott and Rocco Neil April for telling us about this in the comments.

chflags nohidden ~/Library

Use list view in all Finder windows by default

Do you prefer the Finder’s list view? Icon view? Set the default with this command. Use the codes icnv ,clmv , Flwv, for icons, columsn, and cover flow views.

defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"

Show only open applications in the Dock

defaults write com.apple.dock static-only -bool true

Add the keyboard shortcut ⌘ + Enter to send an email in Mail.app

defaults write com.apple.mail NSUserKeyEquivalents -dict-add "Send" "@U21a9"

Disable inline attachments (just show the icons)

Keep your inbox tidy.

defaults write com.apple.mail DisableInlineAttachmentViewing -bool true

Disable local Time Machine backups

This will still allow backups to external disks.

hash tmutil &> /dev/null && sudo tmutil disablelocal

Turn on app auto-update

defaults write com.apple.commerce AutoUpdate -bool true

Allow the App Store to reboot machine on macOS updates

defaults write com.apple.commerce AutoUpdateRestartRequired -bool true

As I said, you can find more of these amazing tips at Github, maintained by Mathias Bynens.

  1. The easiest way to do this is to hit the up arrow, which “reloads” the last command you used. Then, just use backspace to delete “true,” type “false,” and hit enter. If you didn’t already know that trick, then our terminal how-to for beginners is for you. ↩︎