How to set root password in Fedora 28,29 or older versions

The Fedora is based on RedHat and almost work like in the same way, however, just like Ubuntu it also does not give the option to set the root password while the installation. And if you are new to it then after setting up the Fedora Linux you might be baffled; how to access the root user to install some programs. Well, to solve this small problem we are here with this tutorial in which we let you know the commands to setup root user password on Fedora 28, Fedora 29 or earlier versions Fedora 28, 27, 26 and so on.

  1. Go to your Fedora OS.
  2. Open the Command terminal. 
  3. Type the below command to change the default root password and set the new one.
    • sudo passwd root
  4. Once you enter the above command it will ask you to enter the new password for Fedora’s root user.
  5. In case the default Terminal doesn’t work, then search for Qterminal and use that.How to set root passwd in Fedora 28, 29

You can even emulate your the current user to use as root using the below command

sudo su

or

sudo -i

In this way, you can set a root password for your newly installed Fedora OS.

Other articles on Password Reset: