Home Tips and Instructions Linux & UNIX Becoming the Root User (Administrator / Admin User) on Linux and UNIX
Becoming the Root User (Administrator / Admin User) on Linux and UNIX PDF Print E-mail

Before taking a look at any of my other Linux tips you will need to know at least two things:

1. You will need to learn how to become the system administrator.

And

2. In order to become the system administrator you will need to know how to open a terminal program if you are not already working from a command line. I am not going to go over opening a terminal program so you will have to figure this out on your own!

First, however, we need to go over some terminology. The system administrator on Linux and Unix is called root or the root user. So if I refer to being root I am referring to being logged in as the system administrator.

Switching to Root / Becoming the Root User

To switch to root on a Red Hat / Fedora / CentOS Linux system you type su - in a terminal/from a command line and then press Enter. Immediately after doing so you will be prompted for a password. Type in the root user's password and then press Enter and you should now be logged in as root! (Note: On Red Hat based systems the root account is setup during installation. The root account is not the default user's account like on Ubuntu systems.)

On Ubuntu and Mac OS X systems the default user account (setup during installation) is the system administrator. Providing you are logged in under the default account on one of these systems, to switch to root you only need to type sudo before running a command. After you press Enter you will be prompted for your password. After you type your password and press Enter the command will run.

If you have created a limited account for yourself (which is a very good idea!) then to switch to the administrative account you would type su name_of_administrator's_account. For example:

If the administrator's account username is adminuser you would type:

su adminuser

You will then be prompted for the administrator's password. Type the password, press Enter and you will be logged in as administrator! (Note: This is how I do it on my Mac OS X 10.4.9 machine. I have not tried it yet on Ubuntu.)

Now, a word of CAUTION: YOU CAN DO A LOT OF DAMAGE TO YOUR SYSTEM WHEN LOGGED IN AS ROOT SO MAKE SURE YOU KNOW WHAT YOU ARE DOING.