How to create a new user in the Ubuntu system?
You can create a new user in Ubuntu system by following these steps:
- To open the terminal: press the Ctrl + Alt + T keys to open the terminal, or search for the terminal in the application menu and open it.
- Enter the following command to login with root privileges:
sudo -i
- Enter the administrator password and press the Enter key.
- Enter the following command to create a new user, replacing “newuser” with the username you wish to create:
adduser newuser
- Enter the new user’s password and other information, such as full name and home directory, according to the prompts. If this information is not required, you can simply press Enter to skip.
- Next, you will be asked to enter the new user’s password twice for confirmation.
- After creating a new user, you can use the following command to add the new user to the sudo group, granting them administrator privileges:
usermod -aG sudo newuser
- Type in the following command to exit from the root login:
exit
- Enter the following command to switch to the newly created user:
su - newuser
You have now successfully created a new user and switched to that user. You can log in to the Ubuntu system using the new user’s username and password.