macOS

Take Control of OS X



There are hundreds of very nice and useful OS X system settings that cannot be accessed using the UI. To change these settings you'll need to use the command "defaults". Open the Utilities/Terminal.app and type in the desired command.

Here are some of our favorite hidden settings.

Remove Date from Screenshots

  • 10.7, 10.8, 10.9, 10.10, 10.11

By default, screenshots (cmd + shift + 3) are saved on your desktop along with the date and time they were taken. To remove:

defaults write com.apple.screencapture “include-date” 0; killall SystemUIServer

To revert back to the default:

defaults write com.apple.screencapture “include-date” 1; killall SystemUIServer

If does not work, use false/true instead of 0/1:

defaults write com.apple.screencapture “include-date” false; killall SystemUIServer

Display full path in Finder's title Bar

  • 10.7, 10.8, 10.9, 10.10, 10.11

When browsing into the Finder folders, only the name of the current folder is shown on the top of the window. You can enable the display of the complete posix path in the title bar.

defaults write com.apple.finder _FXShowPosixPathInTitle -bool true && killall Finder

To disable it:

defaults write com.apple.finder _FXShowPosixPathInTitle -bool false

Speed up Time Machine backups

  • 10.10, 10.11

Not a defaults setting but worth of being listed here. Time Machine backups are very slow when a large amount of data/files needs to be transferred (such as the initial back-up). The Time Machine background process runs in a very low CPU priority. With the following Terminal command you can temporary speed up the Time Machine backups:

sudo sysctl debug.lowpri_throttle_enabled=0

The command is not persistent and will become inactive after a reboot.

Enable the expand save panel

  • 10.7, 10.8, 10.9, 10.10, 10.11, 10.12

Sometimes it can happen when saving a document that you have to click first on the triangle next to the Location field to open the expanded save window. With the following commands you can enable the expand save panel by default.

To enable:

defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true

To revert:

defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool false
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool false

Setup Time Machine's backup size limit

  • 10.10, 10.11

Time Machine will standard use all the available disk space on an external drive or a external server volume. But you can setup a limit, to do that use the command below. Replace XX by the number of megabytes that you want to use, 1 GB = 1024 MB.

sudo defaults write /Library/Preferences/com.apple.TimeMachine MaxSize -integer XX

Example 200GB:

sudo defaults write /Library/Preferences/com.apple.TimeMachine MaxSize -integer 204800

To remove the limit:

sudo defaults delete /Library/Preferences/com.apple.TimeMachine MaxSize

No shadows on screenshots

  • 10.6, 10.7, 10.8, 10.9,10.10

When you take a screenshot on Mac OS X there’s a shadow around the screenshot by default. Disable the shadow from the screenshot with this Terminal command:

defaults write com.apple.screencapture disable-shadow -bool true && killall SystemUIServer

Revert to the default setting:

defaults write com.apple.screencapture disable-shadow -bool false && killall SystemUIServer

Disable full screen animation of OS X

  • 10.7, 10.8, 10.9, 10.10

You can view windows full screen in many applications, but the animation is slow. You can disable the animation with the following command below. This command also disable the animations for showing and hiding sheets, resizing preference windows and zooming windows.

defaults write -g NSWindowResizeTime -float 0.001

To revert to the default setting:

defaults delete -g NSWindowResizeTime

Stop the power button from putting the mac in Sleep mode

  • 10.9, 10.10

When you press the power button (approx. 1 second) on a Mac installed with OS X Mavericks (10.9) or Yosemite (10.10) the Mac falls into sleepmode. You can disable the power button’s directly sleep mode and have the shutdown dialog appearing instead.

defaults write com.apple.loginwindow PowerButtonSleepsSystem -bool no

To revert back to the OS's default:

defaults write com.apple.loginwindow PowerButtonSleepsSystem -bool yes

Stop the power button from putting the mac in Stand-by mode

  • 10.9

n Mavericks (10.9), when you quickly press this button, it will OS X be placed in standby mode. You can rollback and have the old and good shutdown dialog.

defaults write com.apple.loginwindow PowerButtonSleepsSystem -bool no

To revert to the original settings:

defaults write com.apple.loginwindow PowerButtonSleepsSystem -bool yes

Disable the Mission Control zoom effect

  • 10.7, 10.8, 10.9

Turn off Mission Control’s zoom effect that appear whenever it’s activated or deactivated in OS X 10.7 and above.

defaults write com.apple.dock expose-animation-duration -int 0 && killall Dock

To revert to the original settings:

defaults delete com.apple.dock expose-animation-duration && killall Dock

Pin the Dock in a screen corner

  • 10.7, 10.8, 10.9

The Dock is by default centered along the bottom of the screen, but you can pin the Dock into the corner.

Top corner for a vertical Dock or the lower left corner for horizontal Dock:

defaults write com.apple.dock pinning start;killall Dock

Bottom corners for vertical Dock or the lower right corner for horizontal Dock:

defaults write com.apple.dock pinning end;killall Dock

To restore the default:

defaults write com.apple.dock pinning middle;killall Dock

Flatter UI — Disable shades and gradient effects

  • 10.6, 10.7, 10.8, 10.9

The default theme in OS X still has lots of shades and gradient effects. This tweak will disable and gives the Finder window and a few other programs a flatter look.

defaults write NSGlobalDomain NSUseLeopardWindowValues NO; killall Finder

To restore the default setting:

defaults delete NSGlobalDomain NSUseLeopardWindowValues

Disable Notification Center — Mountain Lion

  • 10.8

You can disable notification center for good! when you do it, you do it for all users on system level!

sudo defaults write /System/Library/LaunchAgents/com.apple.notificationcenterui KeepAlive -bool false && killall NotificationCenter

To Re-enable it use:

sudo defaults write /System/Library/LaunchAgents/com.apple.notificationcenterui KeepAlive -bool true

Disable Dashboard

  • 10.6, 10.7, 10.8

Completely disable OS X Dashboard. On old Mac’s this could save some memory and cpu resources. Use the following command and kill the current running Dashboard.

defaults write com.apple.dashboard mcx-disabled -boolean true && killall Dock

To reactivate the Dashboard use:

defaults write com.apple.dashboard mcx-disabled -boolean false && killall Dock

Increase the speed of dialogs boxes

  • 10.6, 10.7, 10.8

Mac OS X has dialog boxes that are displayed as an animated panel (named ‘sheets’) that emerges from the window’s title bar. It is possible to speed up the ‘sheet’ animation in the native Mac (Cocoa) applications. You'll need to reboot your mac, to make changes affect.

defaults write NSGlobalDomain NSWindowResizeTime .1

.1 is the time of the animation, default time is .2 seconds. To make the sheets instantly visible use the value .001

Restore to the .2 seconds animation:

defaults write NSGlobalDomain NSWindowResizeTime .5

Disable Mission Control

  • 10.7, 10.8

If you never use Mission Control than it is possible to disable the feature entirely and save resources. If you disable Mission Control you also disable the Spaces feature, before disabling Mission Control, close all of your spaces.

defaults write com.apple.dock mcx-expose-disabled -bool TRUE && killall Dock

To restore Mission Control:

defaults delete com.apple.dock mcx-expose-disabled && killall Dock

Remove the Delay when hiding/showing Dock

  • 10.7, 10.8, 10.9, 10.10

You can choose to hide/show the Dock automatically. This has a default speed to display the dock. You can speed it up with a defaults write command. This command removes the delay from when a cursor is hovered near the Dock. It doesn’t change the animation speed of the dock, only the response to the cursor.

defaults write com.apple.dock autohide-delay -float 0 && killall Dock

Revert to the default setting:

defaults delete com.apple.dock autohide-delay && killall Dock

Flush the DNS cache

  • 10.5, 10.6, 10.7, 10.8, 10.9, 10.10

OS X always keeps a local cache of resolved DNS queries (IP address) for future reference. But sometimes it may be necessary to flush (clear) the cache. This command will refresh the local DNS cache.

OSX 10.10

sudo discoveryutil udnsflushcaches

OSX 10.9

dscacheutil -flushcache; sudo killall -HUP mDNSResponder

OSX 10.7 – 10.8

sudo killall -HUP mDNSResponder

OSX 10.5 – 10.6

sudo dscacheutil -flushcache

Disable App Nap

  • 10.9, 10.10, 10.11

App Nap helps you save power and battery life when you’re working with multiple apps at the same time. You can disable this feature for each application by using the info window in the Finder (select the app in Finder and activate this window with cmd? + i). With the following command you can disable App Nap system wide.

defaults write NSGlobalDomain NSAppSleepDisabled -bool YES

To revert to the original settings:

defaults delete NSGlobalDomain NSAppSleepDisabled

Enable debug menu in Mac App Store

  • 10.9, 10.10, 10.11

The Mac App Store has a debug menu just like the most standard Apple applications in OS X. From this menu you can access various of other options such as deleting cookies or the quick search for updates. Close the Mac App Store app and use the following command in Terminal to enable the debug menu.

defaults write com.apple.appstore ShowDebugMenu -bool true

Revert to the default setting:

defaults delete com.apple.appstore ShowDebugMenu