How to set root password in Ubuntu?

You may have noticed that you can’t log in to root account on Ubuntu, this is because root doesn’t actually have a password set by default. So let’s find out how to set root password in Ubuntu.

How to set root password in Ubuntu

Type the following command:
sudo passwd

The following message will appear:

[sudo] password for [username]: [Type your user password and press return]

After that another message will appear, the following:

Type new UNIX password: [Type the root password you want]

Now the last thing you need to do, the following:

Retype new UNIX password: [Retype the root password you chosen before]

That’s it!

Add a Comment

Your email address will not be published. Required fields are marked *