How to add a new user in Ubuntu?
To add a new user in Ubuntu, you can follow these steps:
- To open the terminal, you can use the keyboard shortcut Ctrl + Alt + T.
- Enter the following command to log in as the root user:
sudo su -
- Enter the following command to add a new user (replace “newuser” with the username you want to add):
adduser newuser
- Enter the password and other relevant information to complete the process of creating a new user.
- To confirm that the new user has been successfully created, you can view their information by using the following command:
cat /etc/passwd | grep newuser
- If you need to grant new users sudo privileges, you can add them to the sudo group.
usermod -aG sudo newuser
By following the steps above, you can successfully add a new user and assign necessary permissions in Ubuntu.