Red Hat Linux 7.2: The Official Red Hat Linux Getting Started Guide | ||
---|---|---|
Prev | Chapter 10. Shell Prompt Basics | Next |
One of the easiest ways to find out how to use many commands and some applications is through the man command.
The word "man" stands for "manual," a series of online pages which can tell you the purpose of many commands. In a highly condensed format, man pages provide a summary of a command's purpose, the options available, and the syntax which is used to issue the command. They are divided into the following sections:
Table 10-1. Man Page Sections
Section | Contents |
---|---|
1 | User Commands |
2 | System Calls |
3 | Subroutines |
4 | Devices |
5 | File Formats |
6 | Games |
7 | Miscellaneous |
8 | System Administration |
n | New |
If you are new to Linux, you might not find man pages as useful as someone who is more accustomed to their terse delivery of information. But man pages can provide information on how to use commands on your system. Even at this point, you can gain insight into your system by familiarizing yourself with the man pages. You will certainly want to know how to use them eventually.
There are several ways to view the man pages in a graphical presentation:
From the GNOME help browser (see the section called Finding Help in Chapter 2)
From the KDE help browser ( see the section called Finding Help in Chapter 3)
From an application called xman at the shell prompt
You can quickly access a man page for a particular page by typing man followed by a space and any command at a shell prompt. For example, type man su and the man page for the su command appears.
To scroll forward through the document, press
Of course, like any good help system, the man command has its own man page. At the prompt, type:
man man |
to display the manual page (as shown in Figure 10-1).
For more advanced information on man pages, see the Official Red Hat Linux Reference Guide.
Sometimes, just viewing the man page on the screen is not enough; you may want to have a printed copy in front of you. Although you could send the page to a printer, because of certain text formatting in the man pages, you could end up with a document filled with garbage, (symbols which did not translate from your screen to the printer).
To print a man page, you need to remove the formatting from the page, which you can do with the col command. (As you might guess, there is a man page for col, also.)
For example, to print a man page for the man, type:
man man | col -b | lpr |
In detail, the above command sends the output of the manual page entry through the col filter, which helps format the output for the printer. Then, the output from col is sent to the printer. This is called piping, and you can learn more about it in the section called More Basic Commands for Reading Text Files.
Use a User Account | |
---|---|
Remember, it can be dangerous to work in the root account unless you really need to. If you did not create your user account at the time of your Red Hat Linux installation and you have not done so yet, please do so now. Turn to the section called Creating a user account in Chapter 1 if you need assistance on how to create your user account. |