Create a user with the "Useradd" or "adduser" command
Using the shell command to build a user there are two commands "Useradd" and "AddUser", they are the same. We'll use the Useradd command to demonstrate how to create a new user.
The use of this is the case. Because a user in a Linux system must belong to a group, if you create a new user without specifying a group command, you create a group with exactly the same name as the user and put the new user in. If a group is specified when a new user is created, the user falls into the specified group.
We tried typing in the terminal: Useradd me.
Now we open the Local Users and Groups administration interface by double-clicking the Local Users and Groups icon in the "Red 5.0" with the left mouse button click "Start"--> "Settings"--> "Control Panel". See if there's one more "Me" group.
And a "Me" user.
As we've seen, the "Me" user's "main group" shows "Me."
Next we create a new user "yes" and designate its group as "Hello" that already exists in the system. Please try to enter a command in the terminal: useradd-g Hello yes.
Then we open the Local Users and Groups administration interface by double-clicking the Local Users and Groups icon in the "Red Flag 5.0" with the left mouse button click "Start"--> "Settings"--> "Control Panel". See if there is more than one user named "Yes" in the Group tab. It falls into the group "Hello".