Name
defaults
Synopsis
defaults [-currentHost| -hostname]command
Modifies the defaults system. When you customize your Mac using the
System Preferences, all those changes and settings are stored in the
defaults system. Everything that you’ve done to make
your Mac your own is stored as XML data in the form of a property
list (or plist). This property list is, in turn,
stored in ~/Library/Preferences.
Every time you change one of those settings, that particular property
list is updated. There are two other ways to alter the property
lists: using the Property List Editor application
(/Developer/Applications) or using the
defaults command in the Terminal. Whether you use
System Preferences, Property List Editor, or the
defaults command, any changes you make affect the
current user.
Options
-
-currentHost Perform operations on the local machine.
-
-hostname Perform operations on the specified host.
Commands
-
read Print all your current settings.
-
readdomain Print your settings for the specified domain, such as
com. apple.dock.-
readdomain key Print the value of the specified key. For example, to see the current Dock orientation, use:
defaults read com.apple.dock orientation-
read-typedomain key Print the datatype of the specified key. For example,
defaultsread-typecom.apple.dockorientationtells you that the type of the orientation key isstring.-
writedomain key value Write a value to the specified key.
-
renamedomain old_key new_key Rename the specified key.
-
deletedomain Delete the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access