/etc/group file format

The group membership in Linux is controlled through the /etc/group file. This is a simple text file that contains a list of groups and the members belonging to each group. Just like the /etc/passwd file, the /etc/group file consists of a series of colon-delimited lines, each of which defines a single group. The file is readable by all users.

Here is how an entry in the /etc/group file looks like:

group name:password:GID:list of users

Here is an example entry for our group test_group:

linux etc group file

In the example above you can see that the group test_group has a GID of 5000 and two users: jwilliams and bob.

Linux distributions that use shadow passwords typically place an x in the password field; others place the encrypted password in this field.

Subscribe to our Newsletter

Like us on Facebook

Geek University 2019