groups(1) groups(1)
NAME
groups - print group membership of user
SYNOPSIS
groups [loginname]
DESCRIPTION
groups lists the groups to which a user belongs on standard output.
OPERANDS
loginname
Login name of the user whose group membership is to be checked.
The groups to which the specified user belongs are listed on
standard output.
loginname not specified:
The groups of the user logged in at the terminal are displayed.
LOCALE
The LCMESSAGES environment variable governs the language in which
message texts are displayed. If LCMESSAGES is undefined or is defined
as the null string, it defaults to the value of LANG. If LANG is like-
wise undefined or null, the system acts as if it were not internation-
alized.
The LCALL environment variable governs the entire locale. LCALL
takes precedence over all the other environment variables which affect
internationalization.
EXAMPLES
Example 1
User John wishes to check his own user group:
$ groups
group1
Page 1 Reliant UNIX 5.44 Printed 11/98
groups(1) groups(1)
Example 2
To check the group his colleague Anne belongs to, John must enter her
login name.
$ groups anne
group2
FILES
/etc/passwd
The /etc/passwd file contains the login name and the group ID of
each user.
/etc/group
The /etc/group file contains a list of all user groups that have
been set up. Each user belongs to the group specified in
/etc/passwd and possibly to other groups as specified in
/etc/group.
SEE ALSO
group(4), passwd(4).
Page 2 Reliant UNIX 5.44 Printed 11/98