Linux groupmod command
The Linux groupmod command is used to change a group ID or name.
When you need to change a group's ID or name, you can use the groupmod command.
Syntax
groupmod [-g <群组识别码> <-o>][-n <新群组名称>][群组名称]
Parameters:
- -g <group ID> Set the group ID to be used.
- -o Reuse a group ID.
- -n <new group name> Set the group name to be used.
Examples
Change group name
[root@example.com ~]# groupadd linuxso [root@example.com ~]# tail -1 /etc/group linuxso:x:500: [root@example.com ~]# tail -1 /etc/group linuxso:x:500: [root@example.com ~]# groupmod -n linux linuxso [root@example.com ~]# tail -1 /etc/group linux:x:500:Other extensions
Linux Command Reference