3 thoughts on “How to list all of a users groups in Ubuntu

  1. The above is partially incorrect. “groups” entered on its own on the command line only shows the groups to which the current process belongs. To list all groups on the system, try:

    cat /etc/group

    1. /etc/group will give you the groups on the system BUT does not contain ALL information pertaining to which users are associated to which groups. It doesn’t contain the information around a user’s primary group. So if my user nevyn has a primary group of “finance”, you won’t find nevyn listed next to finance in /etc/group. Instead, this information is stored in /etc/passwd.

Leave a Reply

Your email address will not be published.

Previous post How to find the owner and group of a directory in Ubuntu
Next post How to become root using sudo in Ubuntu