groupadd

Used to create a new workgroup

Supplementary instructions

groupadd command is used to create a new workgroup, and the new workgroup information will be added to the system file.

grammar

groupadd(option)(parameter)

Options

-g: Specify the id of the new workgroup;
-r: Create a system work group, the group ID of the system work group is less than 500;
-K: Overwrite the configuration file "/etc/login.defs";
-o: Allow adding workgroups with non-unique group IDs.

Parameters

Group name: Specify the group name of the new workgroup.

Example

Create a new group and set the group ID to join the system:

groupadd -g 344 jsdigname

At this time, an item with a group ID (GID) of 344 is generated in the /etc/passwd file.