/etc/group

From Linux Bash Shell Scripting Tutorial Wiki
(Redirected from Etc/group)
Jump to navigation Jump to search

The /etc/group file is a text file that defines the groups on the Linux and Unix systems.

Viewing file

Use the cat command

cat /etc/group

Search for nginx group:

grep nginx /etc/group
/etc/group file on Linux
/etc/group file on Linux

File format

There is one entry per line, with the following format. Run the following more command or cat command:

more /etc/group
cat /etc/group
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:

The fields

The format includes the following fields separated by a colon : character:

group_name:password:GID:user_list

The fields are as follows:

/etc/group format on Linux and Unix
Field name Description
group_name The name of the group.
password The (encrypted) group password. If this field is empty, no password is needed.
GID The numeric group ID.
user_list A list of the usernames that are members of this group, separated by commas.

See also