Forever & AlwaysLINUX COMMAND ATLAS

LINUX COMMAND ATLAS · COMMAND GUIDE

Linux groups command

Show the groups to which a user account belongs.

GNU Coreutils

Syntax

Command form
groups [USER]...

Common options

4 options
OptionWhat it does
USERShow the groups for the specified user.
(no argument)Show the groups for the current process user.
--helpDisplay help (GNU Coreutils).
--versionDisplay version information (GNU Coreutils).

Usage examples

2 examples

Show the groups to which a user account belongs.

groups

Show groups for the account alice.

groups alice

Notes

Group membership changes may require a new login session before they affect processes.