A Root Shell On Ubuntu : The Right Way

Just the other day we were having a discussion on using the root shell in Ubuntu.  Now, remember, the root user account is disabled with no assigned password on a default Ubuntu system so administrative tasks need to be done using the sudo command.  For nearly all of the administration you would need sudo will be adequate.  There are occasionally those fringe cases where you might require a root shell.  Below I have a few alternatives and then, if you must, the correct way of opening a root shell.

For more information please see the RootSudo page on the Ubuntu Community Wiki.

Alternatives To A Root Shell

One of the most common reasons that a user might need a root shell is due to output redirection not working as expecting while using sudo.  This can be bypassed fairly easily.  Let me outline an example: