Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Linux groupmod Command

Linux groupmod Command

Linux Command Reference Linux Command Reference

The Linux groupmod command is used to change a group's 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:

Example

Change a group name



[root@runoob.com ~]# groupadd linuxso 

[root@runoob.com ~]# tail -1 /etc/group 

linuxso:x:500: 

[root@runoob.com ~]# tail -1 /etc/group 

linuxso:x:500: 

[root@runoob.com ~]# groupmod -n linux linuxso 

[root@runoob.com ~]# tail -1 /etc/group 

linux:x:500:

Linux Command Reference Linux Command Reference