How to Create a Sudo User on Ubuntu
Whether you just want to create a new user on your Ubuntu OS for yourself, or you want to let someone else use your system with all the privileges like a root user, there comes the use of the Sudo. A sudo user will be able to use all the functions and features of the…

Whether you just want to create a new user on your Ubuntu OS for yourself, or you want to let someone else use your system with all the privileges like a root user, there comes the use of the Sudo. A sudo user will be able to use all the functions and features of the OS just like a root user do. In most of the cases, performing operations as a root user is not recommended. So, as soon as you install the Ubuntu OS on your PC or server, it is always recommended to create a Sudo user and perform the required operations.
In this guide, we are going to familiarize with the term sudoand how to create a sudo user. Without further due, let’s begin the article.
What is a Sudo user?
A sudo user is a user who has the administrative privileges that are only available for the root user by default. As a sudo user, you will be able to perform almost any actions on the OS with all the privileges that a root user has. Sudo performs on a per-command basis and is not similar to the shell that you are using. You will have to put sudo command in front of each line that you want to run with the administrative privileges. This is the quick explanation of the sudo user in Ubuntu.
How to create a Sudo user?
Now, you know what is a sudo user. It is the time to create one. Follow the below-given steps to create a sudo user in Ubuntu.
- Log in to the server as the root user by typing
ssh root@ip_address_of_the_server. - Type
adduser username. Be sure to replace the “username” with your preferred user name. - It will ask you to set a UNIX password for the user. Provide a password, retype it when asked. and you will receive a message saying “password updated successfully.”
Set password prompts:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully - Next, you will be asked a few more details regarding the user you just created. You could either fill them or just skip them by pressing “Enter.” Finally, confirm the given details by typing “Y” and press “Enter.”
User information prompts:
Changing the user information for username
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] - Now you have successfully created a user in Ubuntu. Now it is the time to add the created user to the sudo group. For this, type the following in the command line. Be sure to replace “username” with the correct username.
usermod -aG sudo username - You have successfully added the user to the sudo group. If you want to test it, just switch the user by typing
su - usernameand try to run a command that is only available for the root user. For example, try runningsudo ls -la /root. It will ask you for the sudo user password the first time you are trying to run a sudo command. Provide it when asked, and if the root directory is listed, you are now a sudo user.
More in Linux

Linux Add User to Group
Adding a user to a group is a fairly simple task. It is not as difficult as coding an entire program in the terminal. But most beginners are unaware of the commands and steps to do so. So, in this article on “Linux Add User to Group,” we are going to list the complete step-by-step…

How to Install Spotify in Ubuntu
If you are an Ubuntu user and want to install Spotify in Ubuntu, it used to be a lot harder than on Windows. On Windows, installing software is usually just a matter of running an installer, while Linux works a little differently. If you are struggling to get your favourite music service on your Ubuntu…

How to Install WebTorrent on Linux
WebTorrent is an excellent application available for cross-platforms. It works like a charm for viewing and streaming music using peer to peer Torrent protocol. The WebTorrent application is available for Linux, Mac, and Windows platforms. It is an open source torrent client built on Javascript and uses WebRTC for peer-to-peer connection support. The WebTorrent is…
The week in tech, minus the noise.
New reviews, fixes and the stories that matter — once a week, straight to your inbox.
We only use your email to send the newsletter. Unsubscribe any time. See our privacy policy.
Comments