In Linux, a group is a logical collection of users with the same characteristics. Using groups is conducive to organizing and managing users according to user characteristics; a user belongs to at least one group. When a user belongs to multiple groups is a member of a user, one of the groups is the user's main group, and the other groups are the user's subsidiary groups.
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
A group is a logical collection of users with the same characteristics , using groups helps system administrators organize and manage users according to their characteristics and improve work efficiency.
groupadd [options ] User group name
option is used to set the parameters of the user account. The main options are as shown in the table
Parameters | Description |
---|---|
-g | Group ID is used to create a user group with the specified GID number |
##Example: Create a user group named networks with a GID of 1030
groupmod [options] User group name
Words | Description | |
---|---|---|
gid | Change the group’s GID to gid | |
group-name | Change the name of the group to name (rename) | |
gpasswd [options] [User] [Group]
Description | |
---|---|
Add user to group | |
Remove user from group | |
Cancel the password of the group | |
Assign an administrator to the group |
. Before deleting a specified user group, you must ensure that the user group is not the primary group of any user. Otherwise, you need to delete the accounts of the primary group first and then delete the user group. Use the groupdel command to delete Format: groupdel Username
Related recommendations: "
The above is the detailed content of What is a group in linux. For more information, please follow other related articles on the PHP Chinese website!