Note:- People make mistakes so login as root may harm your system severely so please be careful and remember what you are doing. Also making the smallest mistake(in Ubuntu) can render your computer inoperable.
In Ubuntu linux it's still possible to login with the root or administrator account, and this brief tutorial is going to show you how. If you still wanna login as the root user after all the risks I mentioned above, then continue below to learn how.
To get started, press Ctrl – Alt – T on your keyboard to open Terminal. When it opens, run the commands below to create a new root password.
sudo passwd root
Next, copy and paste the commands below to enable manual or other login.
sudo sh -c 'echo "greeter-show-manual-login=true" >> /etc/lightdm/lightdm.conf'
Restart your workstation and choose to login as Root.
When you login, the username on the username will show Guest, ignore that. You're root!