How Do I Delete a Primary Group in Linux?
Contents How Do I Change the Primary Group in Linux? to Change the Primary Group a User Is Assigned To, Run the Usermod Command, Replacing Examplegroup with...
Contents
How do I change the primary group in Linux?
To change the primary group a user is assigned to, run the usermod command, replacing examplegroup with the name of the group you want to be the primary and exampleusername with the name of the user account. Note the -g here. When you use a lowercase g, you assign a primary group.
Must Read
Does Userdel Remove group?
If set to yes, userdel will remove the user’s group if it contains no more members, and useradd will create by default a group with the name of the user.