Creating a user in Ubuntu is very simple and easy by just following few of the instructions. SSH into your Ubuntu instance or open terminal to proceed.

Create a user in Ubuntu from terminal
  1. Create a new user Account
    Create a new user account using the adduser command.  Replace username with the user name that you want to create:
$adduser username

Adding user `username' ...
Adding new group `username' (1001) ...
Adding new user `username' (1001) with group `username' ...
Creating home directory `/home/username' ...
Copying files from `/etc/skel' ...
New password:
Retype new password:
passwd: password updated successfully

2. Add user to the sudo group

usermod -aG sudo username

3. Switch to new user

su - username

Run the whoami command to check

sudo whoami


You have learned to create a user with sudo privileges. You can now log in to Ubuntu server with this user account and use sudo to run administrative commands.

That’s all! Feel free to leave a comment if you have any questions.