Permissions

Linux groups command

Show the groups to which a user account belongs.

Availability: Common Linux commands; shell built-ins and external implementations may differ by distribution.中文

Syntax

groups [USER]...

Examples

Show groups for the current user.

groups

Show groups for the account alice.

groups alice

Parameters, options and clauses

Option / clauseDescription
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).
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory