Root

From OLPC
Jump to: navigation, search

root is the most powerful user on a linux based computer system. It allows you to execute any command that is available to it.

It will even allow you to execute commands that are harmful to your system. For example, you could delete all of the contents of a folder, or important system files by accident.

It is very important that you be careful when using the root user.

The best option is to type sudo ("super-user do... ") at the start of individual commands you want to run as root, for example sudo rpm options.

Becoming root

There are several ways to become the root user on an XO:

  • at the terminal shell prompt type su and press enter:
 % su
 # 
  • switch to the console, where the shell is automatically root,
  • use a serial port, where the shell is automatically root.

Checking root

When the process is root, the shell prompt normally ends with # rather than $. This is the easiest way to check. Other ways are:

  • enter the command who to check who is logged on.
  • enter whoami to check the effective userid rights of the active session, it will be 0 for root.

See Also

  • su The "su" command
  • sudo The "sudo" command