Home >Operation and Maintenance >Linux Operation and Maintenance >Modify the group to which a user belongs in Linux
Linux Modify the group to which a user belongs
1. Set the group to which a user belongs
usermod -g 用户组 用户名
Note: -g|--gid, modify the user's gid, the group must exist
2. Add the user to a certain group(s)
usermod -a -G 用户组 用户名
Note :
-a|--append, append users to certain groups, only used with the -G option
-G|--groups, append users to certain groups , only used with the -a option
(Online video tutorial sharing: linux video tutorial)
The above is the detailed content of Modify the group to which a user belongs in Linux. For more information, please follow other related articles on the PHP Chinese website!