Skip to content

Latest commit

 

History

History
12 lines (7 loc) · 541 Bytes

add-user-to-group.md

File metadata and controls

12 lines (7 loc) · 541 Bytes

Add a user to a group in Linux

To add a user to a group, use the usermod command:

usermod -aG <groupname> <username>

The -a option adds the user to the listed groups without removing them from groups they are already a part of and the -G option designates that the listed groups will be secondary groups, rather than primary.

See this Stack Overflow post and nixCraft.