How to login as root user in Ubuntu Linux command line. Read this tutorial to become root user in Ubuntu. You can also login as root in Linux without password.
Su Command
The command su is used to run a command with substitute user and group ID. When called with no user specified, su defaults to running an interactive shell as root. When user is specified, additional arguments can be supplied, in which case they are passed to the shell.
The command sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy.
To Login As Root In Linux Without Password
- Open the terminal.
- Input the command % sudo su –
- Press Enter.
- You now have root privileges in the terminal window and your terminal prompt will become #.
Note that # shows that you are currently logged in using the root privileges.