In schools, kids are usually grouped into different groups. For example, kids who like dancing will be part of the dance group. The geeky kids will form the science group. In case you are wondering, I used to be part of the sports group because I was pretty damn fast!
We have the same concept in Linux as users who share similar characteristics are placed in the same group.
A group is a collection of users who share the same role or purpose.
All groups have their information stored in the file /etc/group. And just like with the /etc/passwd file, every line in /etc/group corresponds to exactly one group, and each line consists of 4 fields. For example, one of the most famous groups in Linux is the sudo group:
The following table breaks down those four fields in /etc/group and explains each one of them:
Field |
What does it store? |
1 |
This field stores the group name. |
2 |
This field usually has an X... |