O'Reilly logo

Fedora Linux by Chris Tyler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Accessing Online Documentation

A fully loaded Fedora system includes over 4,700 programs, plus programming interfaces, data files, and graphical tools. To help you learn your way around, over 12,000 files of online documentation are available, with additional documentation available through the Web. Knowing how to access and knowledgeably navigate through this documentation is essential to getting the most out of your Fedora system.

Tip

The phrase online documentation refers to both local and Internet-based electronic documentation.

How Do I Do That?

There are five main types of documentation available:

  • Manpages

  • info pages

  • The GNOME Guides and KDE Manuals

  • HOWTOs and guides from the Linux Documentation Project

  • Text files distributed with applications

Using manpages

Fedora continues the Unix tradition of providing an online version of what were originally loose-leaf printed manuals. These manuals cover the commands, programming interfaces, and data formats used by the system.

The command used to access these online manuals is called man, so these documents have come to be known as manpages. The majority of Fedora documentation is in this format.

The pages are arranged into sections according to the original binders, using the section numbers described in Table 4-2. The section numbers are used to distinguish different manpages with the same name, such as the manpage for the uname system call (found in section 2) and the uname command (found in section 1). In some cases, a letter or two may be appended to a section number to indicate a subsection (such as 3pm, the manual section containing Perl module library functions).

Tip

A system call is a request made of the operating system by an application program.

Table 4-2. Section numbers for manpages

SectionDescription
1 User commands
2System calls
3Library functions
4Special files
5File formats
6Games
7Conventions and miscellany
8Administration and privileged commands

To view the manpage for a particular command, such as ls:

$ man 
                  
                     ls
                  

The output will appear as shown in Figure 4-1. You can use the up and down arrow keys and the Page Up/Page Down keys to scroll through the text, or q to quit. You can also type /, enter some text, and press Enter to search for that text within the document; type n (lowercase n, for next) to search again. ? and N (uppercase N) can be used in the same way to search backwards.

Online display of a manpage

Figure 4-1. Online display of a manpage

To request a manpage from a specific section of the manual, give the section as the first argument and the name of the manpage as the second argument:

$ man 
                  
                     2 uname
                  

If you don’t specify the section, the first section containing a page with the requested name is used—and since there is a uname page in section 1, you won’t see the page from section 2 unless you specifically ask for it.

Finding a manpage

The -k argument of man is used to produce a list of all of the pages that contain a specific keyword in their short descriptions. For example, if you wanted to see all of the manpages that contained the word calendar in their summary:

$ man -k 
                  
                     calendar
                  
Date::Calc           (3pm)  - Gregorian calendar date calculations
Date::Calendar       (3pm)  - Calendar objects for different holiday schemes
Date::Calendar::Profiles (3pm)  - Some sample profiles for Date::Calendar and     
                                     Date::Calendar::Year
Date::Calendar::Year (3pm)  - Implements embedded year objects for Date::Calendar
cal                  (1)  - displays a calendar

Note that the section number is in parentheses. If you were looking for a calendar command, you could ignore the results from section 3 of the manual (library functions), which leaves just one possibility: the cal command. You could then get more information about that command to see if it will do what you need:

$ man 
                  
                     cal
                  

Tip

apropos is another name for man -k. To my ear, it has more class!

To see all of the manpages with a specific name in all sections of the manual, use the whatis command:

$ whatis 
                  
                     uname
                  
uname                (1)  - print system information
uname                (2)  - get name and information about current kernel

In this case, you can see that there is a page for uname in section 1 and 2 of the manual.

Reading info documents

The GNU project supplies most of its documentation in info documents rather than manpages. info documents are a unique form of hypertext and are read with a reader program named, not surprisingly, info:

$ info 
                  
                     ls
                  

info has many features and can be a bit overwhelming. Each document consists of nodes (analogous to web pages) that are linked together using menu options. The keys listed in Table 4-3 are sufficient for basic navigation.

Table 4-3. Basic navigation in info

KeyDescription
Page Up/Page DownScroll through the text.
pGo to the previous node.
nGo to the next node.
TabJump to the next menu option in the current page.
Enter (when the cursor is on a menu option)Follow the menu option.
SpaceGo to the next page, or next node if there is no more text in the current node.
lReturn to the last node accessed.

To take a guided tour of info, type:

$ info info

Viewing GNOME guides and KDE manuals

GNOME and KDE each provide a general user’s guide or manual, with specific chapters (or in some cases, separate manuals) for their various desktop tools.

To access these guides, just press F1 in a GNOME or KDE application. Alternately, select the System→Help (GNOME) or Help (KDE) menu options from the panel bar. The GNOME menu is connected to the GNOME documentation, and the KDE menu is connected to the KDE documentation. You can access the documentation for the other desktop environment from a command prompt; for GNOME documentation, use either of these commands:

$ gnome-help
$ yelp

For KDE documentation:

$ khelpcenter

Tip

Each of these tools also provides a graphical user interface for viewing manpages and info documents.

Accessing HOWTOs and guides

The Linux Documentation Project (TLDP) maintains a very helpful set of documents called HOWTOs, each of which describes the procedure to accomplish a specific task. They also publish some book-length guides. Most of these documents have been translated into multiple languages. However, these documents are generic and do not reflect the default configuration and packaging of Fedora.

The TLDP documentation can be found on the Web at http://www.tldp.org/. TLDP also publishes FAQs and maintains links to online versions of the manpages and free Linux magazines.

Viewing text files distributed with applications

Most open source software packages include a small number of text files written by the programmers, which include licensing information, change histories, errata and bug lists, and release notes. In Fedora these miscellaneous documents are placed in /usr/share/doc and are organized in directories by package name and version. For example, the notes for dia (a diagram-drawing application) are available in /usr/share/doc/dia-0.95.

I find that the easiest way to view these documents is to use a web browser, which enables you to navigate among directories and view documents by simply clicking on them. To do this, just open the Firefox web browser and enter /usr/share/doc as the location.

To view these files from the shell prompt, change to the directory you wish to view, and then use ls to list names of the files and less to view the contents of any text files that interest you. For example, here are the steps you might take to view the dia text files:

$ cd /usr/share/doc
$ ls -d dia*
dia-0.95  dialog-1.0.20050306
$ cd dia-0.95
$ ls -l
total 724
-rw-r--r--  1 root root   1578 Aug 16  2004 AUTHORS
-rw-r--r--  1 root root 574015 Aug 17  2004 ChangeLog
-rw-r--r--  1 root root  17992 Mar 12  2004 COPYING
-rw-r--r--  1 root root  11364 Aug 16  2004 custom-shapes
-rw-r--r--  1 root root   1620 Aug 16  2004 diagram.dtd
-rw-r--r--  1 root root   3927 Aug 16  2004 INSTALL
-rw-r--r--  1 root root   4955 Aug 16  2004 KNOWN_BUGS
-rw-r--r--  1 root root  21535 Aug 17  2004 NEWS
-rw-r--r--  1 root root   3444 Aug 16  2004 README
drwxr-xr-x  2 root root   4096 Sep 27 01:13 samples
-rw-r--r--  1 root root   2324 Aug 16  2004 shape.dtd
-rw-r--r--  1 root root    501 Aug 16  2004 sheet.dtd
-rw-r--r--  1 root root   1379 Aug 19  2004 THANKS
-rw-r--r--  1 root root   2545 Aug 16  2004 TODO
$ less KNOWN_BUGS

The less command will enable you to scroll through the specified file (KNOWN_BUGS) in the same way that you would move through a manpage, using the arrow keys and Page Up/Page Down keys to scroll and q to quit.

Note that this directory also contains a sample directory, which includes some sample files for use with the dia program.

What About...

...printing a manpage?

The man command’s -t option will format a page into PostScript; you can then send the PostScript output to your printer with the command lpr using a pipe. This command prints the manpage for ls:

$ man -t ls | lpr

...making a PDF or HTML version of a manpage?

It’s easy to convert manpages into PDF or HTML formats.

For PDF, use the -t option with man and then pipe the PostScript output into the ps2pdf program. This command places the manpage for ls into the file ls_man_page.pdf:

$ man -t ls | ps2pdf - 
                  
                     ls_man_page.pdf
                  

The commands to convert a manpage to HTML are more complex:

$ zcat $(man --path 
                  
                     ls
                  
                  ) | man2html | tail +3 > 
                  
                     ls_man_page.html
                  

This uses man --path to find the compressed, unformatted manual page; zcat to decompress the page; man2html to convert the page to HTML; and tail to strip off the unneeded httpd Content-type header.

Where Can I Learn More?

Other sources of information about Fedora and Linux:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required