groups
Print the groups a user is in
Overview
The groups command prints the names of the primary and any supplementary groups for each given username, or the current process if no username is given.
Syntax
groups [OPTION]... [USERNAME]...Examples
$ groups
Display the groups the current user is a member of.
$ groups anotheruser
Display the groups anotheruser is a member of.
$ groups root adm cdrom
Display group memberships for users root, adm, and cdrom.
Related Commands
groupmembershipuserlistgroups