list users and groups

See the accounts on this machine, the groups, and who is in each.

  • users
  • system

Steps

  1. getent passwd | cut -d: -f1

    every account's name

  2. getent passwd | awk -F: '$3 >= 1000 {print $1}'

    the people, not the system accounts (Linux)

  3. getent group

    every group and its members

  4. groups NAME

    the groups of one user

  5. id

    your own user, groups and numbers

  6. dscl . list /Users

    macOS

Commands used

  • getent
  • groups
  • id

Each has a page in lore: lore getent opens it.