WHOAMI(1)

NAME
whoami - print effective user name
id - print uid,gid,supplemental groups
groups - print supplemental groups

SYNOPSIS
whoami
groups
id [-rgGSnuvh] [--real-id] [--group] [--supplemental] [--standard] [--names] [--user-id] [--version] [--help] [user]

DESCRIPTION
Whoami displays the effective users name. Groups displays the supplemental groups list for the effective user. Id displays the effective user id, name, group, and supplemental group. By default, it prints the user-id, the user name, the group-id, the group name, and all the supplemental group-ids and names. You may restrict the output by specifying various options:

-r , --real-id
    Show the real id, not the effective id.

-g, --group
    Show the group.

-G , --supplemental
    Show additional groups (in /etc/group) that this user belongs to. -S, --standard Use the standard output format for id without options:
    what=id(name)

-n , --names
    Show the user and group names, not the ids.

-u , --user-id
    Show the user id.

-v , --version
    Show the version number (and only the version number), then exit.

-h , --help
    Show a short help message, then exit.

EXAMPLES

whoami
    Is a shorthand for id -nu

id -ugGS
    is exactly the same as id without options.

To only print the group and supplemental groups
    id -gG

AUTHOR
David Parsons ( orc@pell.chi.il.us )

BUGS
When id show supplemental groups, it does not attempt to sort or make them unique, thus if you belong to group wheel locally and you also belong to group wheel via yellow pages, this group will show up twice in the supplemental groups listing.