Ubuntu Linux: How to Login as root User

tl;dr: root user is disabled by default. Make use of sudo to perform administrative tasks with elevated privileges.

If you are on a Ubuntu Linux distribution system and want to login as root user, then the first thing you should know is "the root user is disabled by default in Ubuntu for security reason" - Read the official page: https://help.ubuntu.com/community/RootSudo

So the su - command will not work.

But, If you are a part of the sudoer group (sudo) then you can make use of the sudo command to perform administrative tasks with elevated privileges.


Examples:
# sudo apt install python3

[sudo] password for mike: 
Reading package lists... Done
...
# sudo nano /etc/nginx/nginx.conf
Ubuntu Linux Login as root user

Comments & Discussion

Facing issues? Have questions? Post them here! We're happy to help!