Defaults Command

One of the joys of working on a Unix system is the ability to tweak various system settings, even better when you can do so from a command-line shell (terminal). The means to get there on Mac OS X is the defaults command. Using defaults you can read, write and delete various application and system preferences.

Often times, many of the preferences you can set using defaults are available through an applications preferences menu. On the other hand, when settings are not available with this approach, using defaults is a good option.

You can learn more by accessing the manual page from the command line: man defaults. You can view the same information at the Apple developer website. There is one caveat to take into consideration (taken directly from the manual page):

Since applications do access the defaults system while theyre run-
ning, you shouldnt modify the defaults of a running application. If you
change a default in a domain that belongs to a running application, the
application wont see the change and might even overwrite the default.

Here is an example from a terminal window enter the following two lines:

> defaults write wvous-floater -bool YES
> killall Dock

The first line writes a preference for the dock domain (application), specifying that the wvous-floater preference be set to true (YES). The result of this is that a funky blue orb will be displayed on the desktop and when clicked will engage the Expose application. This could be handy if you do not have Expose mapped to a keyboard shortcut. The second line restarts the Dock so the change can take affect immediately.

Expose orb

Please follow and like us:

Leave a Reply

Your email address will not be published. Required fields are marked *