Man and Info Pages

Man pages are a short form of manual pages and are available on just about every command on the system and on all the most important configuration files. There are also man pages on some general topics such as Wireless. Info pages primarily contain documentation for GNU utilities. The commands man man and info info will give you more information about these utilties.

Man/Info pages are one of the most overlooked sources of documentation on Linux or UNIX which is why one of the first questions you'll be asked when you pose a question on IRC is, "Did you read the man page?" The term man page is short for manual page. Man pages are help pages that you read by typing man subject where subject is the topic of interest.

Man pages are all organized the same way. They all organized like the example below:

Figure 2. Example Man Page

FOO(1)                                FSF                               FOO(1)

NAME
       foo - an imaginary command used to demonstrate what a man page looks like.

SYNOPSIS
       foo [OPTION] [FILE]...

DESCRIPTION
       Perform the foo operation on the specified files.

       -A, --show-all

       -n, --number
              number all output lines

       -v, --verbose
              print out extra diagnostic information

       --help display this help and exit

       --version
              output version information and exit

       With no FILE, or when FILE is -, read standard input and foo it.

AUTHOR
       Written by Iam Noman and Noah Body.

REPORTING BUGS
       Report bugs to bug-coreutils@nofoo.org.

COPYRIGHT
       Copyright ¿ 2004 Ray Benjamin.
       This is free software; see the source for copying conditions.  There is
       NO warranty; not even for MERCHANTABILITY or FITNESS FOR  A  PARTICULAR
       PURPOSE.

SEE ALSO
       The  full  documentation for foo is maintained nowhere since it is an
       imaginary command.


foo (coreutils) 5.0               March 2004                            FOO(1)

The See Also section and Files are often extremely useful since they can tell you where else to look for important information.

The man program that displays the help files is pretty simple to operate. You can use the up, down, pageup and pagedown keys to navigate through the document. Simply type q when you want to exit the help screen.

The info is a little more friendly. Information is organized in hierarchies of nodes. Type help getting started into the Info browser and you'll be given instructions on how to navigate through the utility's screens.

If you are used to Microsoft Windows, you might be a bit frustrated by these utilities at first. There are no scroll bars and you can't use the roller on the mouse. If you are a touch-typist though, you might come to appreciate the ease with which you can navigate without having to take your fingers from the keyboard.

Konqueror Support For Man and Info Pages

The Konqueror browser supports man and info pages. Simply type man:topic or info:topic into the browser bar. This way of viewing man and info pages will be much more familiar to those of you used to MS Windows.

Figure 3. Using Konqueror to View Man Page

Screenshot of Konqueror displaying man page.

Figure 4. Using Konqueror to View Info Page

Screenshot of Konqueror displaying info page.

Problems Displaying Info Pages

I have had mixed success using Konqueror to display info page using the info:topic method. One way to find a list of topics that will work that way is by doing a directory listing of the /usr/share/info directory. (Using ls /usr/share/info.) This will give you a directory listing of info files that looks a little like the following:

Figure 5. Listing of /usr/share/info

[rben@Prot rben]$ ls /usr/share/info
a2ps.info-1.gz           gettext.info-5.gz    lispref.info-3.gz
a2ps.info-2.gz           gettext.info-6.gz    lispref.info-40.gz
a2ps.info-3.gz           gettext.info-7.gz    lispref.info-41.gz
a2ps.info-4.gz           gettext.info-8.gz    lispref.info-42.gz
a2ps.info-5.gz           gettext.info-9.gz    lispref.info-43.gz
 .
 .
 .
gettext.info-2.gz        lispref.info-37.gz   xemacs.info-9.gz
gettext.info-3.gz        lispref.info-38.gz   xemacs.info.gz
gettext.info-4.gz        lispref.info-39.gz
[rben@Prot rben]$
      

I left out much of the above listing for the sake of brevity. Use the portion of the filename that comes before .info as your topic when you use info:topic in Konqueror, and everything seems to work fine. Once you are in an info page, you can use buttons and links in the page to navigate the info system hierarchically. It's still an improvement over the old info command.

Finding Your Man Page and Whatis Apropos

There is a very useful command for finding out what commands are used for what purpose. The command is apropos. Apropos searches a database of command descriptions, so if you want to find out what command utilize regular expressions, you can try the command apropos regular expression. You'll get something like the figure below.

Figure 6. Example of Using Apropos Command

[rben@Prot rben]$ apropos regular expression
bzegrep [bzgrep]     (1)  - search possibly bzip2 compressed files for a regular expression
bzfgrep [bzgrep]     (1)  - search possibly bzip2 compressed files for a regular expression
bzgrep               (1)  - search possibly bzip2 compressed files for a regular expression
pbmmask              (1)  - create a mask bitmap from a regular bitmap
pcregrep             (1)  - a grep with Perl-compatible regular expressions
pcretest             (1)  - a program for testing Perl-compatible regular expressions
perlfaq6             (1)  - Regular Expressions ($Revision: 1.20 $, $Date: 2003/01/03 20:05:28 $)
perlre               (1)  - Perl regular expressions
perlrequick          (1)  - Perl regular expressions quick start
perlreref            (1)  - Perl Regular Expressions Reference
perlretut            (1)  - Perl regular expressions tutorial
polyominoes          (1)  - fill a rectangle with irregularly-shaped blocks
polytopes            (1)  - Draws one of the six regular 4d polytopes rotating in 4d
regex                (7)  - POSIX 1003.2 regular expressions
zgrep                (1)  - search possibly compressed files for a regular expression
bzegrep [bzgrep]     (1)  - search possibly bzip2 compressed files for a regular expression
bzfgrep [bzgrep]     (1)  - search possibly bzip2 compressed files for a regular expression
bzgrep               (1)  - search possibly bzip2 compressed files for a regular expression
expr                 (1)  - evaluate expressions
pcregrep             (1)  - a grep with Perl-compatible regular expressions
pcretest             (1)  - a program for testing Perl-compatible regular expressions
perlfaq6             (1)  - Regular Expressions ($Revision: 1.20 $, $Date: 2003/01/03 20:05:28 $)
perlre               (1)  - Perl regular expressions
perlrequick          (1)  - Perl regular expressions quick start
perlreref            (1)  - Perl Regular Expressions Reference
perlretut            (1)  - Perl regular expressions tutorial
regex                (7)  - POSIX 1003.2 regular expressions
zgrep                (1)  - search possibly compressed files for a regular expression
[rben@Prot rben]$
      

Note

The man -k is identical to apropos.

If you want to a brief description of what a particular command does, you can use the command whatis. The figure below shows the output from the command whatis perl.

Figure 7. Example of Using the Whatis Command

[rben@Prot rben]$ whatis perl
perl                 (1)  - Practical Extraction and Report Language
[rben@Prot rben]$
      

Using these command together provides a very powerful way to find out more about the command on your Linux system and what they are used for. Once you've got some idea of what commands might do the job for you, you can use man or info to find out the details on how that command works.