Datasheet
Task 1.1: Use Basic Command-Line Features
9
you can move from section to section of the documentation for a program. Type info info
to learn more about this system.
Both man pages and info pages are usually written in a terse style. They’re intended as ref-
erence tools, not tutorials; they frequently assume basic familiarity with the command, or at
least with Linux generally. For more tutorial information, you must look elsewhere, such as
this book or the Web. The Linux Documentation Project (http://tldp.org) is a particularly
relevant Web-based resource for learning about various Linux topics.
Obtaining Superuser Privileges
To fully administer a Linux system, you must sometimes use the superuser account, which
goes by the name root. Although you can log directly into the root account, it’s generally best
to instead log into a regular user account and then acquire superuser privileges.
One way to do this is to use the su command, whose name stands for switch user. You can
actually acquire any user’s identify in this way by typing the target username after the com-
mand, as in su hyde to acquire hyde’s privileges. If you omit a username, root is assumed,
so typing su alone is equivalent to typing su root. In any of these cases, you must know the
target user’s password, so only users who know the root password may acquire superuser
privileges via su. Once you’re using the root account, though, you can use su to acquire any
user’s privileges without a password. This can be a helpful problem-solving tool, since you can
locate problems that are user specific.
Try using su to acquire root privileges. Depending upon your system configuration,
chances are your prompt will change. For instance, a Fedora Core system shows the following
prompts:
[sally@halrloprillalar ~]$ su
Password:
[root@halrloprillalar sally]#
Logging Out
Once you’re done, you should log out. This is a particularly important security measure if your
computer is in a public place. If you’re using a login shell (that is, if you logged into the shell
via a login prompt), you can log out by typing logout at the command prompt. If you’re using
an xterm window or have used su to acquire another user’s privileges, though, you should
type exit to log out. (In fact, exit will also work with login shells.)
If you logged into an X session using a GUI login tool, you should log out from that session.
Most desktop environments provide an obvious way to do that via their main menuing sys-
tems. Typically, you’ll see a power button icon or a menu option titled “log out” or “exit.”
Some environments give you the option of logging out, rebooting the computer, or shutting
down the computer. Be sure to save files and exit from programs that open files before logging
out of an X session. You needn’t worry about shutting down xterm windows or other pro-
grams that don’t open disk files, though.
83484.book Page 9 Monday, September 18, 2006 8:58 AM










