
g
groups(1) | groups(1) |
NAME
groups - show group memberships
SYNOPSIS
groups
DESCRIPTION
groups shows the groups to which the caller or the optionally speci®ed user belong. If invoked with no arguments, groups prints the current access list returned by getgroups() (see getgroups(2)).
Each user belongs to a group speci®ed in the password ®le /etc/passwd and possibly to other groups as speci®ed in the ®les /etc/group and /etc/logingroup. A user is granted the permissions of those groups speci®ed in /etc/passwd and /etc/logingroup at login time. The permissions of the groups speci®ed in /etc/group are normally available only with the use of newgrp (see newgrp(1)). If a user name is speci®ed with no options, groups prints the union of all these groups.
The
The printed list of groups is sorted in ascending collation order (see Environment Variables below).
EXTERNAL INFLUENCES
Environment Variables
LC_COLLATE determines the order in which the output is sorted.
If LC_COLLATE is not speci®ed in the environment or is set to the empty string, the value of LANG is used as a default. If LANG is not speci®ed or is set to the empty string, a default of ``C'' (see lang(5)) is used instead of LANG. If any internationalization variable contains an invalid setting, groups behaves as if all internationalization variables are set to ``C'' (see environ(5)).
EXAMPLES
Check ®le /etc/logingroup and display all groups to which user tim belongs:
groups
AUTHOR
groups was developed by the University of California, Berkeley.
FILES
/etc/group
/etc/logingroup
/etc/passwd
SEE ALSO
id(1), newgrp(1), getgroups(2), initgroups(3C), cuserid(3S), group(4).
Section 1−342 | − 1 − |