Chapter 4. User, Group and Permission

Groupdel (Delete Group)

Groupdel (Delete Group)
Tag:

The groupdel (GROUP DELete) command is used to delete an existing group.

Delete a group

To delete a group, run the groupdel [group name] command. For example, to delete group_a, run the following command.

Command Line - INPUT
groupdel group_b

To check group_a's status, check the /etc/group file. You can see that group_a no longer exists.

Command Line - INPUT
grep group /etc/group
Command Line - INTERACTIVE
nogroup:x:65534:
group_a:x:1003:user_a
group_c:x:1005:user_a

The groupdel (GROUP DELete) command is used to delete an existing group.

Delete a group

To delete a group, run the groupdel [group name] command. For example, to delete group_a, run the following command.

Command Line - INPUT
groupdel group_b

To check group_a's status, check the /etc/group file. You can see that group_a no longer exists.

Command Line - INPUT
grep group /etc/group
Command Line - INTERACTIVE
nogroup:x:65534:
group_a:x:1003:user_a
group_c:x:1005:user_a
Tag: