![]() |
VOOZH | about |
Group management commands in Linux are used to create, modify, and manage user groups on the system. These commands help administrators control group-based access to files and resources, making user management easier and more secure in multi-user environments.
The following commands are used for group management in Linux.
The groupadd command is used to create a new user group on the system. It helps organize users with similar access requirements.
Syntax:
groupadd group_nameExample:
groupadd developersThe groupdel command is used to delete an existing group from the system. It removes group-related entries safely.
Syntax:
groupdel group_nameExample:
groupdel developersThe groupmod command is used to modify an existing groupβs properties. It can change the group name or group ID.
Syntax:
groupmod [options] group_nameExample:
groupmod -n devteam developersThe groups command displays the groups a user belongs to. It helps verify group memberships.
Syntax:
groups usernameExample:
groups user1The gpasswd command is used to manage group passwords and group membership. It allows adding or removing users from groups.
Syntax:
gpasswd [options] group_nameExample:
gpasswd -a umang geeksπ ImageThe grpck command checks the integrity of group files. It verifies entries in /etc/group and /etc/gshadow.
Syntax:
grpckExample:
grpckThe grpconv command converts group information to shadow format. It improves security by storing sensitive group data securely.
Syntax:
grpconvExample:
grpconv