System Info
groups
Print the groups a user belongs to.
Synopsis
syntax
groups [USER]...
Examples
Show groups for current user
groups
Show groups for user alice
groups alice
Show groups for multiple users
groups root www-data
About groups
The `groups` command print the groups a user belongs to. System information commands provide insight into hardware, kernel, memory, disk, and user session details.
These are typically the first tools you reach for when diagnosing system problems, capacity planning, or auditing a server's configuration. They work across most Linux distributions without additional packages.
The command accepts 0 commonly used flags shown above, though the full set of options is available in the man page (`man groups`). The 3 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.
Related commands
More System Info Commands
Other commands in the System Info category