Ubuntu: How to add a existing user to an existing group

 

To add an existing user to a second group, use the following command:

 

sudo usermod -a -G [group] [user]

 

e.g.:

 

sudo usermod -a -G geeks bob

 

This will add the user bob to the group geeks.