Thursday, March 8, 2012

Running Ubuntu as Root


In Linux (and Unix in general), there is a SuperUser named Root. The Windows equivalent of Root is Administrators group. The SuperUser can do anything and everything, and thus doing daily work as the SuperUser can be dangerous. You could type a command incorrectly and destroy the system. Ideally, you run as a user that has only the privileges needed for the task at hand. In some cases, this is necessarily Root, but most of the time it is a regular user. 

By default, the Root account password is locked in Ubuntu. This means that you cannot login as Root directly or use the su command to become the Root user. 


To simulate yourself as root, use:

sudo -i
 

To enable the Root account (i.e. set a password) use:
 
sudo passwd root
 
 

No comments:

Post a Comment