Skip to content
TrySitePrice

Ubuntu Linux: Find Groups A User Belongs To

Best/Tutorial

To find the groups that a user belongs to in Ubuntu Linux, you can use the groups command.

Here’s how to find the groups that a user belongs to:

  1. Open a terminal window or log in to a virtual console.
  2. Type the following command to list the groups that the specified user belongs to:
    groups <username>

    Replace <username> with the name of the user that you want to find the groups for.

For example:

$ groups john
njohn : john sudo

In this example, the user john belongs to the john and sudo groups.

Note: The output may vary depending on the Linux distribution and the specific user configuration.

n(pamblancopainting.com)