Managing groups
Linux uses groups to organize users. Simply put, a group is a collection of users sharing a common attribute. Examples of such groups could be employees, developers, managers, and so on. In Linux, a group is uniquely identified by a GID. Users within the same group share the same GID.
From a user’s perspective, there are two types of groups, outlined here:
- Primary group: The user’s initial (default) login group
- Supplementary groups: A list of groups the user is also a member of; also known as secondary groups
Every Linux user is a member of a primary group. A user can belong to multiple supplementary groups or no supplementary groups at all. In other words, there is one mandatory primary group associated with each Linux user, and a user can have multiple or no supplementary group memberships.
From a practical point of view, we can look at groups as a permissive context of collaboration for a select number of users. Imagine a developers...