All rights reserved, please indicate the source when citing
groupmod - Modify Group
This is a command related to account and group management. groupmod (groupmodify) is mainly used to fine-tune group settings. The basic usage of the groupmod command is groupmod [OPTIONS] GROUP_NAME.
-g GID:將Change the numeric group ID (GID) of the group to the specified value.
-n NEW_GAME:Change the name of the group to the specified new name.
-o :Allow the use of a non-unique GID. This option is used when changing the GID to a value that is already in use by another group
-R CHROOT_DIR::Apply changes in the specified directory, which serves as the root of the filesystem.
Example: (Logged in as "root")
# groupmod -n new_grp old_grp←Rename the group "old_group" to "new_group"
# groupmod -g 1001 mygroup←Change the GID of the group "mygroup" to 1001
For more information and examples about groupmod, refer to the provided link.