1. Create a user group

The command instructions
groupadd Create (add) a user group

Create user group effect picture:

2. Create a user and specify a user group

Create user and specify user group:

3. Delete the user group

The command instructions
groupdel Deleting a User Group

Delete user group effect picture:



Description:

  • If there is a user under the user group, delete the user before deleting the user group

4. Summary

  • To create a user group, run the sudo groupadd command
  • To create a user and specify a user group, run the sudo useradd -m -g user group user name
  • To delete a user group, run the sudo groupdel command
  • To view user group information, use the /etc/group file

note

If you have any questions or suggestions, please add wechat: 13960699696.