Add user to existing group

For some mysterious reason I just cannot remember how to do this for the last 15 times. So time to write this thing down. Adding a user david to an existing group audio in Linux:

# usermod -a -G audio david

Don't forget to use sudo in Ubuntu. I've also noticed that shells don't react to this until you relogin.

Changin users primary group is done the following way:

# usermod -g audio thefreakdj

To list all groups that current user belongs to, try this one:

# groups

Your thoughts

No comments

Add comment

* - required field

*




*