Table of Contents

Create Delete And Modify Local Groups And Group Memberships

General Information

Local group management.


Important Files

Groups config file


Group Commands

See what groups a user is a part of (two methods)

id student
groups student


See what members are apart of the group “class1”

getent group class1
OR
groupmems -l -g class1


Create new group

groupadd class1


Set primary group (-g) for the user “student” to “class1”

usermod -g class1 student


Append (-a) supplementary group(-G) for the user “student”

usermod -aG class2 student


Change group name to “class5” from “class1”

groupmod -n class5 class1


Delete group

groupdel class5