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.

-g
--group

Print only the group ID.

-G
--groups

Print only the group ID and the supplementary groups.

-n
--name

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

-r
--real

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

-u
--user

Print only the user ID.

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


© manpagez.com 2000-2017
Individual documents may contain additional copyright information.