groups(1)groups(1)Namegroups - show group memberships
Syntaxgroups [user]
Description
The command shows the groups to which the specified user belongs deter‐
mined by reading These are the groups that will be in effect the next
time the usr logs in. If the command is used without the usr argument,
it will report the groups currently in effect using the system call. If
the file was changed after the login, this may not be the same.
Each user belongs to a group specified in the password file and possi‐
bly to other groups as specified in the file If you do not own a file
but you do belong to the group by which it is owned, you are granted
group access to the file.
When a new file is created it is given the group specifications of the
directory in which it resides.
FilesSee Alsosetgroups(2)groups(1)