How to add a user to a group in Linux
usermod -a -G
Its a simple as that. So for me adding the user “chewett” to the user “vboxusers” i run the command
usermod -a -G vboxusers chewett
The -a flag means that the new group is appended, without it you will overwrite your current groups with the specified one, In nearly all cases this is not what you want to do!