How do I find the primary group in Linux?

Huyền Thu

New member
How do I find the primary group in Linux?
Answer
There are multiple ways to find out the groups a user belongs to. The primary user’s group is
stored in the /etc/passwd file and the supplementary groups, if any, are listed in the /etc/group file. One way to find the user’s groups is to list the contents of those files using cat , less or grep .
 

Tìm kiếm

Back
Top