OK, I'll try to clarify how it works in macOS.
Application preferences are handled through a system API. The preferences are stored in a dictionary based on the application bundle ID (eg com.stairways.keyboardmaestro.editor for the Keyboard Maestro editor) and a key, eg "WombatFontSize", and each entry has a type and value, eg numeric and 3.7. These files are stored in corresponding plist XML files in ~/Library/Application Support/, though the system can cache them as well.
They are accessed using an API in the application, and can be accessed using the defaults
tool as well.
The files are in your user account, so if you have multiple user accounts on your Mac, each account will have its own preferences folder). If you don't know, the ~
in the path ~/Library/Application Support/
refers to your home folder, typically /Users/YOURUSERNAME.
So, as I said in my previous paragraph, using defaults
to change the preference is:
- Exactly the same as if it was changed using the API in the application (except the application does not know about the change, which is why some changes require quitting and relaunching the application).
- Cannot affect any other user account.
- Do not affect the system in any way.
So it is not at all like the Windows registry for example, which is, at least as I understand it, a global database of system preferences.
I hope that clarifies some of what I said.