From LQWiki
The groups command tells what groups (and supplementary groups) a user or process belong to.
Process information
If groups is run without arguments, it writes the groups that the present process belongs to.
For example:
$ whoami robot $ groups hive
This would be a process owned by user "robot", belonging to group "hive."
User information
If groups is run with a user as an argument, it writes the groups that the named user belongs to.
For example:
$ whoami robot $ groups robot hive dockingbay command
This would be a user "robot", belonging to groups "hive," "dockingbay," and "command." The last two groups, "dockingbay," and "command," are likely suplementary groups, that can be activated with su or newgrp.
See also
- id - a more powerful command, providing much more information

This page is available under a