Linux - How to change the group of a user, Usermod command to change group
How to change the group of a user
By default a user is created with the same group name. You can change the group of a user to another group as specified in the above example.
syntax:
usermod -g <groupname> -U <username>
You can change the group of a user by using the usermod command.
example:
usermod -g newgroup -U myuser
usermod -g group user
If you want to retain the existing group and add a user to a supplementary group then run use below linux command.
usermod -a -G group user
The topic on Linux - How to change the group of a user is posted by - Math
Hope you have enjoyed, Linux - How to change the group of a userThanks for your time