dscl
CautionQuery Directory Services
dscl . -list /Users
Reads/edits the local directory — UIDs, hidden users, group data; the low-level account inspector.
Examples
dscl . -read /Users/taro UniqueIDRead a user's UID
Syntax
dscl . -list /Users / dscl . -read /Users/<name>
Before you run it
Writes can corrupt accounts.
Related commands
- sysadminctlManage macOS users
- dseditgroupEdit group membership
- getentQuery NSS databases
The same reference, with no signal at all
Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.
Get it free on the App Store