In Linux, a group is a collection of user accounts. It acts as a fundamental building block for the system's permission and security model. Its core purpose is to simplify the management of access rights for multiple users simultaneously, rather than assigning permissions to each user individually.
Groups allow bulk assignment of permissions.
For example, instead of configuring access for each user individually,
you can create a group (e.g., developers), assign a directory to that
group, and then grant permissions to the group. Any user in that group
inherits those permissions automatically.
Groups enforce the principle of least privilege.
You can create groups such as finance, hr, or project‑specific teams
to restrict sensitive data to authorized users only.
When a directory is shared with group write access, all members of that group can create and modify files---ideal for teamwork and shared project spaces.
Some system groups provide special capabilities: - sudo or wheel →
run commands with administrative privileges\
dialout→ access serial ports without being root
Primary Group:
Each user has exactly one primary group. Newly created files inherit
this group.
Supplementary Groups:
Users can belong to additional groups that grant extra permissions.
Check a user's groups:
groups username
id usernameEvery file or directory has 3 permission sets:
Entity Description
User (Owner) Account that owns the file Group Group that owns the file Other Everyone else
Each can have:
Permission File Meaning Directory Meaning
read (r) View file List directory write (w) Modify/overwrite file Add/delete/rename files execute (x) Execute file Enter directory
View permissions:
ls -lExample:
-rw-rw-r-- shows User, Group, Other permissions.
Goal: Allow a team of developers to collaborate in /var/project.
sudo groupadd developerssudo usermod -aG developers alice
sudo usermod -aG developers bobsudo chgrp developers /var/projectsudo chmod 770 /var/projectNow Alice and Bob can fully collaborate in the directory. Adding new
developers simply means adding them to the developers group.
Linux groups make permission management scalable and secure.
They allow you to:
- Assign access rights to many users at once\
- Secure sensitive data via role‑based permissions\
- Enable collaboration in shared directories\
- Grant special privileges through system groups
If you'd like to dive deeper into permissions, ACLs, or user management, feel free to ask!