{
    "mode": "man",
    "parameter": "groups",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/groups/1/json",
    "generated": "2026-06-02T19:34:20Z",
    "synopsis": "groups [OPTION]... [USERNAME]...",
    "sections": {
        "NAME": {
            "content": "groups - print the groups a user is in\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "groups [OPTION]... [USERNAME]...\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Print  group  memberships  for each USERNAME or, if no USERNAME is specified, for the current\nprocess (which may differ if the groups database has changed).\n\n--help display this help and exit\n",
            "subsections": [
                {
                    "name": "--version",
                    "content": "output version information and exit\n",
                    "long": "--version"
                }
            ]
        },
        "AUTHOR": {
            "content": "Written by David MacKenzie and James Youngman.\n",
            "subsections": []
        },
        "REPORTING BUGS": {
            "content": "GNU coreutils online help: <https://www.gnu.org/software/coreutils/>\nReport any translation bugs to <https://translationproject.org/team/>\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright © 2020 Free Software Foundation, Inc.  License GPLv3+: GNU GPL version 3  or  later\n<https://gnu.org/licenses/gpl.html>.\nThis  is free software: you are free to change and redistribute it.  There is NO WARRANTY, to\nthe extent permitted by law.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "getent(1)\n\nFull documentation <https://www.gnu.org/software/coreutils/groups>\nor available locally via: info '(coreutils) groups invocation'\n\n\n\nGNU coreutils 8.32                          January 2026                                   GROUPS(1)",
            "subsections": []
        }
    },
    "summary": "groups - print the groups a user is in",
    "flags": [
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "output version information and exit"
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "getent",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/getent/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Print group memberships for a user.",
        "examples": [
            {
                "description": "Print group memberships for the current user",
                "command": "groups"
            },
            {
                "description": "Print group memberships for a list of users",
                "command": "groups {{username1 username2 ...}}"
            }
        ]
    }
}