A group is a named list of accounts. Groups let you give the same access to many accounts at one time. Each group has a name and a number, the group ID (GID).
/etc/group
/etc/group lists every group, one line for each:
staff1 name:x:15003 group ID:ana,ben4 members
text
learner@tidepool:~$ grep staff /etc/group
staff:x:1500:ana,benPrimary and other groups
| Primary group | Other groups | |
|---|---|---|
| How many | Exactly one | None, one or many |
| Where it is set | Field 4 of /etc/passwd | The members field of /etc/group |
| Used for | The group of the files that the account makes | More access |
On Ubuntu, each new account gets a primary group with the same name. The account learner has the primary group learner.
The group sudo is special. Its members can run commands as root. A later lesson explains it.