Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
How to perform root level commands on Linux (Fedora) Live Media

I just installed F17 and am trying to learn the basics of bash.

All that I know for sure is that the dollar sign after [name@pc] means that I'm a regular user. Is this correct?

share|improve this question

marked as duplicate by Canadian Luke, KronoS, Nifle, MaQleod, Diogo Aug 16 '12 at 21:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

id mark this close match to another post >>… – tao Aug 16 '12 at 20:27
up vote 2 down vote accepted

The super user (or administrator) usually is called root and has a user id of 0. You can check that by entering id root. This will show information about a user called root.

In order to become a super user, you can simply log on using the user root, if it is allowed. So where ever you initially are asked for a login and password, enter root and its password.

Usually, however, root login is disabled. In this case, a user uses sudo to run a program as root. sudo bash will open a root shell (bash) for you. But this only works if you are allowed to use sudo. Usually, this is the case if you are in the sudo group.

You can check the groups you are member of by simply using id, or id your-username.

How the prompt looks like totally depends on the user settings in .bashrc. By default, $ is an ordinary user and # an administrator.

share|improve this answer

The other option if you aren't already added to the sudo group is to run the command su. This will prompt you for the root password, and then give you a root shell (which will persist until you close the terminal/log out.)

Note that running a command with sudo will only run that single command as root. So if you run sudo <some privileged command>, it'll run as root, but any commands you enter after that will still run as your normal user login.

One possible sticking point with using su to get a root shell: you may not know the root password. It may have been set during install, or, if root login is disabled, it may not be set at all. If you don't know the root password, you'll probably have to have to get sudo working, so that you can actually set the root password.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged .