Tech Junkie Blog: Switching To root User With The sudo Command On Ubuntu Server

Tuesday, March 24, 2015

Switching To root User With The sudo Command On Ubuntu Server

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





Blogs in this series:
  1. Creating a New Virtual Machine for Ubuntu Server
  2. Mounting the Ubuntu Server ISO on VirtualBox
  3. Install Ubuntu Operating System on VirtualBox
  4. Install A Desktop GUI on Ubuntu Server 
  5.  Switching To root User With The sudo Command On Ubuntu Server
  6. Installing Apache Web Server On Ubuntu Server

No comments:

Post a Comment