Use Man Pages for Information

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

SectionContents
1User Commands
2System Calls
3Subroutines
4Devices
5File Formats
6Games
7Miscellaneous
8System Administration
nNew

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:

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 [Space]; to scroll back, press [b]. To quit the document, press [q].

Figure 10-1. Reading a Man Page at the Shell Prompt

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.

Printing a Man Page

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.

NoteUse 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.