How enable root password on Ubuntu

By default, Ubuntu does not set up a root password and therefore, you don't get the ability to log in as root. To log you as root on Ubuntu you have to use sudo -s or sudo -i, with sudo -s runs a shell with root privileges and sudo -i also acquires the root user's environment.




Enabling the Root account is rarely necessary. Almost everything you need to do as an administrator of an Ubuntu system, it can to does via sudo or gksudo. If you really need a persistent Root login, the best alternative is to simulate a Root login shell using the sudo -i command.


Open a Terminal, give the key combination Ctrl + Alt + T

oder in Ubuntu 18.04.2 LTS (Bionic Beaver) Oben links in der Ecke auf das Symbol klicken

icon activies

in dem Fenster "Type to search..."

window search ubuntu ,

Schreibt, terminal.


You can enable the root account and set a password with the command

sudo passwd root


1) write on the Terminal

$ sudo passwd root , and press Enter


Give it, and press Enter

give a password for your root, and press Enter write hin on a paper for not forget...

repeat the password for the root user, and press Enter .


How to show it

image to see the console


2. Disable root account

To disable the root account, tap

sudo passwd -dl root

will ask for your user password, write it, and press Enter .









You comment is welcome: