groups(1)groups(1)NAMEgroups - show group memberships
SYNOPSIS
[user]
DESCRIPTION
shows the groups to which the caller or the optionally specified user
belong. If invoked with no arguments, prints the current access list
returned by (see getgroups(2)).
Each user belongs to a group specified in the password file and possi‐
bly to other groups as specified in the files and A user is granted the
permissions of those groups specified in and at login time. The per‐
missions of the groups specified in are normally available only with
the use of (see newgrp(1)). If a user name is specified with no
options, prints the union of all these groups.
The and options limit the printed list to those groups specified in and
respectively. If a user name is not specified with any of these
options, is called to determine the default user name (see
cuserid(3S)).
The printed list of groups is sorted in ascending collation order (see
Environment Variables below).
EXTERNAL INFLUENCES
Environment Variables
determines the order in which the output is sorted.
If is not specified in the environment or is set to the empty string,
the value of is used as a default. If is not specified or is set to
the empty string, a default of ``C'' (see lang(5)) is used instead of
If any internationalization variable contains an invalid setting,
behaves as if all internationalization variables are set to ``C'' (see
environ(5)).
EXAMPLES
Check file and display all groups to which user belongs:
AUTHOR
was developed by the University of California, Berkeley.
FILESSEE ALSOid(1), newgrp(1), getgroups(2), initgroups(3C), cuserid(3S), group(4).
groups(1)