Article
Create a New User from the terminal on Ubuntu
Nov 28, 2021
Vineel Sai
Root User
Before you get started make sure you are in root user with the following command.
shsudo sh
Adding a New User
- Run the following command to create a new user.
shadduser username
- You will be asked to enter a password for the user and confirm it and you will be asked to enter some details about the user you can either fill them or leave them empty.

Adding the User to the sudo Group
- Run the following command to add the user to the sudo group.
shusermod -aG sudo username

Switching to the New User
- Run the following command to switch to the new user.
shsu username

Testing sudo access
- To make sure that the user has sudo access run a command with sudo.
shsudo apt update
