Latest web development tutorials

Linux groupmod command

Linux command Daquan Linux command Daquan

Linux groupmod command changes the group identification code or name.

When you need to change the identification code or name of the group, it can be used groupmod instructions to complete the job.

grammar

groupmod [-g <群组识别码> <-o>][-n <新群组名称>][群组名称]

Parameters:

  • -g <group ID> Set To use the group ID.
  • -o group identification code reuse.
  • -n <new group name> Set the name of the group want to use.

Examples

Modify the group name

[[email protected] ~]# groupadd linuxso 
[[email protected] ~]# tail -1 /etc/group 
linuxso:x:500: 
[[email protected] ~]# tail -1 /etc/group 
linuxso:x:500: 
[[email protected] ~]# groupmod -n linux linuxso 
[[email protected] ~]# tail -1 /etc/group 
linux:x:500:

Linux command Daquan Linux command Daquan