id - show user information
id [-Gnuagraph] [user]
id displays the user and group names and numeric IDs of the calling process. If the real and effective IDs are different, both are displayed, otherwise only the real ID is displayed.
If a user (username or user ID) is specified, the information about that user is displayed instead of the information from the calling process.
- -G Display all of the group IDs (effective, real, etc) separated by a space. The IDs are not in a given order.
- -a Nothing. The option is included for compatibility with some versions of id.
- -g Display the effective group ID.
- -h Display the usage help message.
- -n Force the options
-uto display the matching name instead of the number for the user and group IDs. If any of the ID numbers do not have a matching name, the number will be displayed as usual.
- -p Display the user/group information on seperate lines. If the username returned by getlogin is different than the username associated with the calling program's user ID, it is displayed preceded by the phrase "login". The real ID, effective user ID (if different), real group ID, and effective group ID (if different) are displayed preceded by "uid", "euid", "rgid", and "egid" respectively. Finally, group membership is displayed with each group separated by a space. All information is displayed as names unless there is no name matching the ID. Then the ID is shown as usual.
- -r Force the options
-gand <-u> to display the information associated with the real user/group IDs instead of the effective ID information.
- -u Display the effective user ID.
id returns 0 on success or 1 if an error occurred.
Theo Van Dinter (firstname.lastname@example.org)