What Is Primary Group Linux?
Contents

The Primary Group is a group that is automatically generated while creating a user with a unique user ID simultaneously a group with ID same as the user ID is created and the user gets added to the group and becomes the first and only member of the group. This group is called the primary group.

What is primary group Ubuntu?

The primary group is the group applied to you when you log in using the usual methods (TTYs, GUI, SSH, etc.).

How do I find primary and secondary groups in Linux?

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 .

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest