Plurrrr

Sat 08 Jun 2019

Finding a user's ID on macOS

If you want to know a users uid on macOS or OS X you can use the directory service command line utility as follows:

dscl . -read /Users/john UniqueID

Which reports in my case:

UniqueID: 501

Another option is to use:

ls -n /Users | grep john

Which, reports in my case

drwxr-xr-x+ 46 501  20   1564 May 31 21:26 john