Shell/Bash: ubuntu add user to group Example


Shell/Bash Example: This is the "ubuntu add user to group" Example. compiled from many sources on the internet by

ubuntu add user to group

sudo usermod -a -G group username

add user to group

usermod -a -G examplegroup exampleusername

linux add user to group

# Change the primary group a user is assigned to, note the -g here.
# When you use a lowercase g, you assign a primary group. When you 
# use an uppercase -G you assign a new secondary group.
usermod -g groupname username

group of user ubuntu


linux add user to group

# add user to additional group

usermod -G groupname username

* Summary: This "ubuntu add user to group" Shell/Bash Example is compiled from the internet. If you have any questions, please leave a comment. Thank you!