Linux User and user group settings, linux User Group
View the group to which the current user belongs
Groups
View the groups to which <user1>, <user2>, and <user3> belong.
Groups <user1> <user2> <user3>
Change the user's main user group or additional group
Usremod <user>-g <maingroup>-G <addgroup>
Differences between linux user groups and users
A group is like a community. A user is like a Member. Generally, a user created in linux automatically creates a group for the user by default, unless a group is specified, such as a user name: useradd fly: groupadd fly is automatically executed in the background at the same time. Therefore, this user belongs to the fly group. If multiple users are grouped into one group, this is especially good for ftp, samba, and other services. In this way, you only need to set permissions for the group, which also reduces a lot of background management troubles.
How to add a new user in Linux and set a password for the user
Useradd Username
Passwd User Name
Enter the password.