How to Setup Ubuntu Root User Password Using Command

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.

ALSO SEE:

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.

 

Leave a Reply

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