Monday, September 13, 2010

How to log into a Linux Terminal as root

Much of the tweaking and hacking in Ubuntu is done via the Terminal, which can be explained to beginners as a command line equivalent for Linux. A lot of things a power user does in a Terminal requires you to log in as a root user. So, for those who are still confused, I'll explain you how to do exactly that.

An administrator is the 'janitor' of the computer. But it doesn't have all the permissions a root user has. For beginners, it can be explained as a step further beyond the administrative elevation in Windows. A root user can change absolutely anything on a Linux system. Even the system files. The files that cannot be edited normally can be edited when they are opened from the Terminal by a root level user.

So, to log in as root, open a Terminal window first...

Now, type in:

sudo -i

Now, as with any other command, hit enter. You will be prompted for your password now. Type it in. Yes, that is normal. The password won't appear. But keep typing. It is getting recorded. After you're done, hit the return key. 

The screen should change to:

Now, you are logged in as root. You can now change the GRUB settings, as required in this little trick, or do anything else that requires a root level authentication.