Group Management
Learn how to create, manage, and modify Linux groups, assign users to groups, and control group memberships using standard Linux administration commands.
Overview
Group management is an essential Linux administration skill used to organize users and control access to files, directories, and system resources. In this lab, you will learn how to create, modify, manage, and delete groups using standard Linux group management commands. You will work with commands such as groupadd, groupmod, groupdel, usermod, and gpasswd to manage group memberships, primary groups, group administrators, and group configuration files in Linux.
In This Lab, You’ll Learn How To
- Create and manage Linux groups
- Assign users to supplementary and primary groups
- Modify group names and GIDs
- View user and group membership information
- Manage group administrators using gpasswd
- Query group details from system files
- Delete users and groups safely
Key Group Management Commands
groupaddfor creating groupsgroupmodfor modifying group settingsgroupdelfor removing groupsusermodfor managing group membershipsgroupsandidfor viewing membershipsgpasswdfor managing group administrators
Command Examples
Create a new group:
groupadd developers
Create a group with a custom GID:
groupadd -g 2000 devops
Add a user to a supplementary group:
usermod -aG developers alice
Display group memberships:
groups charlie
Delete a group:
groupdel developers
Learning Outcomes
- Understand Linux group structure and management
- Create and configure groups with custom settings
- Manage user memberships and primary groups
- View and verify group information
- Develop practical Linux administration skills
Conclusion
Completing this lab will help you gain hands-on experience with Linux group management and user access control. You will learn how to organize users efficiently and manage group-based permissions using standard Linux administration tools. These skills are important for Linux system administration, LFCS preparation, and managing secure multi-user Linux environments.