1D1C - groupadd

create a new group.

groupadd - create a new group.

1. To create a new Linux group.

$ sudo groupadd webadmin

2. To check

$ sudo grep webadmin /etc/group

image.png

3. To Create new group with a specific groupid

$ sudo groupadd webadmin2 -g 1030

image.png

4. To check

$ sudo grep 1030 /etc/group

image.png

5. To create group with group id with certain range of id

$ sudo groupadd webadmin3 -K GID_MIN=1500 -K GID_MAX=2000

image.png