You can use AddUser and useradd to add users and use Userdel to delete users.
The simplest of commands:
sudo adduser test
Group with the same name, create/home/test/, copy files from etc/skel/, and set password and associated initial identity information
command of the original point:
sudo useradd-mk/home/test2-s/bin/bash test2
sudo passwd test2
If you break this step down one-by-one to do:
sudo mkdir/home/test3
sudo useradd-d/home/test3-s/bin/bash test3
sudo chown test3:test3/home/test3
sudo cp/etc/skel/*/home/test3
sudo passwd test3
To delete a user:
sudo userdel test
Rm-rf/home/test
Add sudo permissions to the user
1, after root access, enter the command under root, you can modify your user rights (for example: usermod-a-G sudo lhj) is to give Lhj added sudo permissions.
2, or in the/etc/group file inside the SUDO:X:27:LHJ,LH. LHJ and LH are also added sudo permissions,
Ubuntu Create user commands