What is the equivalent of the 'gsettings' command on OS X? Under Ubuntu it's possible to get various settings information via gsettings command in terminal. For instance, current wallpaper path can be obtained via

$ gsettings get org.gnome.desktop.background picture-uri
'file:///home/jdoe/Pictures/wallpaper.png'


List of items on dock

$ gsettings get  com.canonical.Unity.Launcher favorites
['application://wps-office-et.desktop', 'application://wps-office-wpp.desktop', 'application://wps-office-wps.desktop', 'unity://running-apps', 'unity://devices']


Is there something similar for OS X ?
The most approaching command line interface on MacOS X is the command defaults. All the settings are hierarchically structured inside domains, which are separated by dots (as in Ubuntu settings).

To get all the domains containing settings (the equivalent of gsettings list-schemas), enter:

defaults domains


and for a human readable version, enter:

defaults domains | sed -E 's/, /\
/g' | sort