How to Setup Ubuntu Root User Password Using Command

- Advertisment -
- Advertisement -

Ubuntu is the Debian based Linux operating system that can operate using both command and Graphical user interface. The Ubuntu is most popular Linux Distro. Most of the advance level task or installation of software packages in Ubuntu are performed by using the commands. The user you have created can do all the tasks but in many operations, you may need to access the Ubuntu root user. By default the root password of Ubuntu is unknown and if you need the root user then you might need to set up a password for it.

To set a new root password for Ubuntu via Terminal is very simple, just follow some simple commands given in this article.


100 Linux Ubuntu Keyboard Shortcuts

Linux Ubuntu Keyboard shortcuts

How To Change or Set New Root Password In Ubuntu

Note: To set the root password you should be logged in and have the sudo access.

Step 1: Run the Ubuntu terminal by pressing Ctrl+Alt+T.  if you are using the Ubuntu server edition command base then you can directly enter the commands given in following steps.

Step 2: I am assuming that you already have opened the terminal and now type the command:

Sudo passwd root


Ubuntu root user

Step 3: Once you run the above command it will ask for the current user password from the security point of view. Give your current password and press ENTER. When you press enter, it will ask to set up a new password for Ubuntu root user. Provide the new password for root user and hit Enter.


Ubuntu create user

Step 4: After providing the new password for Ubuntu root user, the system again ask to Retype the new UNIX password in order to confirm.

Ubuntu root

Step 5: Congrats!! The new root password has setup successfully, now you become a root user. From now onwards, every time when you want to switch and access the root user just type— su and give the root password use have set above.

Ubuntu root command

Now you can use the root user to issue powerful commands on Ubuntu. Also, if you want to change the root password then follow the same method given above to change the password root.


Ankur Sharma
Ankur Sharma is the youngest tech lover and writer at H2S Media board and has a keen interest in solving daily problems of people related to gadgets and apps. Besides writing, he is also a theater and acting lover person!!


Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Latest Posts

Future of the Gaming Industry in India 2020

With the population of 1.3billions, India automatically becomes the biggest market for any industry if even...

How to install IIS web server on Windows 10 Step by Step

IIS (internet information services manager) on Windows 10/7 Desktop or server is basically a flexible and secure Web server...

How to assign labels to emails on Google Mail or Gmail to organize emails

We get hundreds of emails every single day, and among all that we get, only a handful of them,...

Top 10 myths related to technology that you should stop believing

Today, when we talk about tech, the 90’s kids and the Millenials mostly refer to the latest smartphones, LED...
- Advertisement -

CloudWalker offers deep discounts on its 4K LED TV and BURST soundbar

Press release: The tech company CloudWalker creating digital products for smart entertainment on the big screen has announced a...

Kodak TV at Rs.4,999 only on Amazon Great Indian sale

Press release: Kodak HD LED TV has partnered with the e-commerce platform, Amazon, for ‘Great Indian Sale’ which begins on 19th January and...

- Advertisment -
- Advertisement -

You might also likeRELATED
Recommended to you