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 IDs and the corresponding names of the invoking process. If the effective and real IDs 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 IDs of the selected user are written. In this case, effective IDs are assumed to be identical to real IDs.
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 Hewlett-Packard Company and AT&T.
SEE ALSO
groups(1), logname(1), getuid(2).
STANDARDS CONFORMANCE
id: SVID2, XPG2, XPG3, proposed POSIX.2 FIPS (June 1990)
Hewlett-Packard Company — HP-UX Release 8.05: June 1991