Linux Advanced Command (x): User Group related operations, command can create user groups know

User Group related operations


learning target

  • Create a user can know the command group

1. Create a user group

command Explanation
groupadd Create (add) User Group

Creating user groups renderings:

[Pictures of foreign chains dumping fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-WECxLuKL-1583935144866) (imgs /% E7% 94% A8% E6% 88% B7% E7% BB% 84-1.png)]

2. Create a user and specify the user group

Create a user and specify the user group renderings:

[Pictures of foreign chains dumping fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-agdlAXqG-1583935144866) (imgs /% E7% 94% A8% E6% 88% B7% E7% BB% 84-2.png)]

3. Modify User Group

FIG Modify User Group effect:

[Image dump the chain fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-Yuuj3zA8-1583935144867) (imgs /% E7% 94% A8% E6% 88% B7% E7% BB% 84-3.png)]

4. Delete User Group

command Explanation
groupdel Deleting User Groups

Delete a user group renderings:

[Pictures of foreign chains dumping fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-RbxEw8HO-1583935144867) (imgs /% E7% 94% A8% E6% 88% B7% E7% BB% 84-4.png)]

Description:

  • If the user has set the following user to delete a user delete a user group

5. Summary

  • Creating user groups: sudo groupadd User Group Name
  • Create a user and assign user groups: sudo useradd -m -g users username
  • Modify user groups: sudo user the usermod -g group username
  • Delete user groups: sudo groupdel User Group Name
Published 698 original articles · won praise 928 · views 120 000 +

Guess you like

Origin blog.csdn.net/qq_35456045/article/details/104807040
Recommended