List of all users and groups
The tool you want is almost certainly dscl. The shortest way to do it was already pointed out: $ dscl . list /users $ dscl . list /groups If you want to output information about each user, though, use readall: $ dscl . readall /users $ dscl . readall /groups And if you need to … Read more