groups
display user group memberships
TLDR
Show current user groups
$ groups
Show groups for user$ groups [username]
Show groups for multiple users$ groups [user1] [user2]
SYNOPSIS
groups [options] [users]
DESCRIPTION
groups displays the group memberships for a user. Without arguments, it shows groups for the current user. The primary group is listed first, followed by supplementary groups.The command reads from /etc/group and the user's supplementary group list. It is equivalent to id -Gn but with simpler output formatting.
PARAMETERS
USERS
Usernames to check groups for.--help
Display help information.--version
Display version.
CAVEATS
Shows cached groups at login. New group memberships require re-login. Primary group shown first.
HISTORY
groups is a standard Unix command, part of GNU coreutils on Linux systems.
