Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Thursday, June 13, 2019
 
 

groups(1)

Name

groups - print group membership of user

Synopsis

groups [user]...

Description

The command groups prints on standard output the groups to which you or the optionally specified user belong. Each user belongs to a group specified in /etc/passwd and possibly to other groups as specified in /etc/group. Note that /etc/passwd specifies the numerical ID (gid) of the group. The groups command converts gid to the group name in the output.

Examples

The output takes the following form:

example% groups tester01 tester02
tester01 : staff
tester02 : staff
example%

Files

/etc/passwd

/etc/group

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/core-os

See Also

group(5), passwd(5), attributes(7)