id(1)
NAME
id − print user and group IDs and names
SYNOPSIS
id [-g|-u] [-nr] [user]
DESCRIPTION
id writes a message on the standard output, giving the user and group ID s and the corresponding names of the invoking process. If the effective and real ID s do not match, both are printed.
If the user operand is specified and the process is a user with appropriate privileges, the user and group ID s of the selected user are written. In this case, effective ID s are assumed to be identical to real ID s.
If the process has supplementary group affiliations (see groups(1)), the supplementary group affiliations are also written.
Options
-g Output only the group ID in decimal format. To modify, use the -n option. The default group ID is the effective group ID. To modify, use the -r option. If the invoking process has supplementary group affiliations that are different from the effective group ID , output each such affiliation in decimal format on the same line.
-n With -u or -g, output the name in character string format instead of the numeric ID.
-r With -u or -g, output the real ID instead of the effective ID.
-u Output only the user ID in decimal format. To modify, use the -n option. The default group ID is the effective group ID. To modify, use the -r option.
AUTHOR
id was developed by HP and AT&T.
SEE ALSO
groups(1), logname(1), getuid(2).
STANDARDS CONFORMANCE
id: SVID2, XPG2, XPG3, POSIX.2
Hewlett-Packard Company — HP-UX Release 9.0: August 1992