Tuesday, March 24, 2015

Linux Ubuntu Server: Switching To root User With The sudo Command

Since Ubuntu does not configure the root account by default you have to manually assign root a password before you can use the root account.  However, there's a way to log in as "root" without setting up the "root" password.  The way to do this is to use the "sudo" and "su" command in combination.  The "sudo" elevates your privileges to root like priviledges, while the "su" command is used to switch from one user to another.  So when used together you get to log in as "root".

So in your Linux prompt type in the following command

sudo su

sudo su to log in as root





enter the password when asked, after you've entered your password you can run commands as "root"

sudo su logged in as root






No comments:

Post a Comment