OS Manuals

/usr/bin/id

Cross-platform Rust rewrite of the GNU coreutils.

From uutils 0.12.0-r6 (os), captured 2026-11-07 by running id --help (exit 0). permalink

Print user and group information for each specified USER,
or (when USER omitted) for the current user.

Usage: id [OPTION]... [USER]...

Arguments:
  [USER]...

Options:
  -a, --ignore   ignore, for compatibility with other versions
  -A             Display the process audit user ID and other process audit properties,
                 which requires privilege (not available on Linux).
  -u, --user     Display only the effective user ID as a number.
  -g, --group    Display only the effective group ID as a number
  -G, --groups   Display only the different group IDs as white-space separated numbers,
                 in no particular order.
  -p             Make the output human-readable. Each display is on a separate line.
  -n, --name     Display the name of the user or group ID for the -G, -g and -u options
                 instead of the number.
                 If any of the ID numbers cannot be mapped into
                 names, the number will be displayed as usual.
  -P             Display the id as a password file entry.
  -r, --real     Display the real ID for the -G, -g and -u options instead of
                 the effective ID.
  -z, --zero     delimit entries with NUL characters, not whitespace;
                 not permitted in default format
  -Z, --context  print only the security context of the process
  -h, --help     Print help
  -V, --version  Print version

The id utility displays the user and group names and numeric IDs, of the
calling process, to the standard output. If the real and effective IDs are
different, both are displayed, otherwise only the real ID is displayed.

If a user (login name or user ID) is specified, the user and group IDs of
that user are displayed. In this case, the real and effective IDs are
assumed to be the same.
Options (13)
OptionDescriptionSource
-a, --ignoreignore, for compatibility with other versionshelp + man
-ADisplay the process audit user ID and other process audit properties, which requires privilege (not available on Linux).help + man
-u, --userDisplay only the effective user ID as a number.help + man
-g, --groupDisplay only the effective group ID as a numberhelp + man
-G, --groupsDisplay only the different group IDs as white-space separated numbers, in no particular order.help + man
-pMake the output human-readable.help + man
-n, --nameDisplay the name of the user or group ID for the -G, -g and -u options instead of the number.help + man
-PDisplay the id as a password file entry.help + man
-r, --realDisplay the real ID for the -G, -g and -u options instead of the effective ID.help + man
-z, --zerodelimit entries with NUL characters, not whitespace;help + man
-Z, --contextprint only the security context of the process (not enabled)help + man
-h, --helpPrint helphelp + man
-V, --versionPrint versionhelp + man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.