Configuration

Utilities

defaults — access the Mac OS X user defaults system

The use of sudo shows different results (per user or system)

defaults read com.apple.screensaver
defaults -currentHost read com.apple.screensaver
sudo defaults read com.apple.UserAccountUpdater
defaults domains | sed 's/, /\'$'\n/g'
sudo defaults domains | sed 's/, /\'$'\n/g'

Disable screen saver

defaults -currentHost write com.apple.screensaver idleTime 0

Create .plist in ~/Library/Preferences/ByHost/

/usr/bin/defaults -currentHost write com.harmonicinc.MediaGrid.Preferences noopendelete -bool NO

Get the version of an application

defaults read "/Applications/Splashtop Streamer.app/Contents/Info.plist" CFBundleShortVersionString

plutil — property list utility

plutil -p ~/Library/Preferences/ByHost/com.apple.screensaver.<harware UUID>.plist
plutil -p /System/Library/LaunchDaemons/com.apple.xsan.plist

scutil — Manage system configuration parameters

scutil --dns

Rename computer

scutil --set ComputerName YourComputerName
scutil --set HostName YourHostName
scutil --set LocalHostName YourLocalHostName

system_profiler — reports system hardware and software configuration

system_profiler -listDataTypes
system_profiler SPHardwareDataType
system_profiler SPHardwareDataType | awk '/Hardware UUID/ {print $3}'

systemsetup — configuration tool for certain machine settings in System Preferences

-getremoteloginDisplays whether remote login (SSH) is on or off.
-setremotelogin [-f] on | offSets remote login (SSH) to either on or off. Requires Full Disk Access privileges.
-getwakeonnetworkaccessDisplays whether wake on network access is on or off.
-setwakeonnetworkaccess on | offUse this command to specify whether the server wakes from sleep when a network admin packet is sent to it.
systemsetup -getremotelogin