Forrest logo
back to the defaults tool

defaults:tldr:d64b6

defaults: Read system defaults for an application option.
$ defaults read "${application}" "${option}"
try on your machine

The command defaults read "${application}" "${option}" is used to retrieve the value of a specific option/setting from a specific application's preferences (plist) file.

Here is how it works:

  1. ${application} is a placeholder that should be replaced with the actual name of the application whose preferences you want to read. This can be any macOS application installed on your system.

  2. ${option} is a placeholder that should be replaced with the specific option or setting whose value you want to retrieve from the application's preferences. This can be any valid preference key associated with the application.

For example, let's say you want to retrieve the value of the "FontSize" option from the "TextEdit" application's preferences. You would use the command:

defaults read "com.apple.TextEdit" "FontSize"

This command would read the TextEdit application's preferences file and return the value of the "FontSize" option, which specifies the font size used in the application.

The output of the command will be the value of the specified option/setting, which could be a string, a number, or another data type depending on the specific option.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the defaults tool