Add a user to a group in Linux

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!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.