manpagez: man pages & more
info coreutils
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

20.1 id: Print user identity

id prints information about the given user, or the process running it if no user is specified. Synopsis:

id [option]… [username]

By default, it prints the real user ID, real group ID, effective user ID if different from the real user ID, effective group ID if different from the real group ID, and supplemental group IDs.

Each of these numeric values is preceded by an identifying string and followed by the corresponding user or group name in parentheses.

The options cause id to print only part of the above information. Also see Common options.


Print only the group ID.


Print only the group ID and the supplementary groups.


Print the user or group name instead of the ID number. Requires ‘-u’, ‘-g’, or ‘-G’.


Print the real, instead of effective, user or group ID. Requires ‘-u’, ‘-g’, or ‘-G’.


Print only the user ID.

An exit status of zero indicates success, and a nonzero value indicates failure.

© 2000-2021
Individual documents may contain additional copyright information.