How to add a new user in Ubuntu?

To add a new user in Ubuntu, you can follow these steps:

  1. To open the terminal, you can use the keyboard shortcut Ctrl + Alt + T.
  2. Enter the following command to log in as the root user:
sudo su -
  1. Enter the following command to add a new user (replace “newuser” with the username you want to add):
adduser newuser
  1. Enter the password and other relevant information to complete the process of creating a new user.
  2. 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
  1. 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.

bannerAds