Getting Access to Documentation Under Linux

By: James Andrews
Saturday, May 29, 1999 01:36:47 PM EST
URL: http://www.linuxplanet.com/linuxplanet/tutorials/207/1/

Introduction

One potential problem that the new user to Linux faces is that there are lots of new commands, features, applications and other items to learn about. Often there is a limit to what one can be expected to take in.

What Documentation is For
So to give you a hand remembering which commands to use, and any options they take, there is online documentation. The online documentation is just an aid to learning, not intended as an alternative to getting experience the hard way, taking a course or having a tame Linux guru on hand. You have been warned!

The man Command

The most powerful and useful command available is 'man' (manual). In its simplest form, one simply types 'man' and then the name of the man page. For instance

man wc

brings up the man page of the wc (word count) program. man also has some very basic searching facilities. For instance the command

man -k printer

brings up

a2ps (1) - format files for printing on a PostScript printer
banner (6) - print large banner on printer
lp (4) - line printer devices
lpc (8) - line printer control program
lpd (8) - line printer spooler daemon
lprm (1) - remove jobs from the line printer spooling queue
pac (8) - printer/plotter accounting information
print (3ncurses) - ship binary data to printer
printcap (5) - printer capability data base

on my system.

The content of the man pages is arranged in a highly technical fashion. To be blunt, man pages can seem impenetrable to the neophyte. One important facet of man pages is the way in which they are laid out. There are sections: NAME, DESCRIPTION, OPTIONS, FILES and BUGS are some standard ones. These can be helpful: if you just want to locate the program's configuration files, type:

/FILE

in the man commands page to search forward for the FILES section and the answer should be there. When man pages refer to other man pages (which they often do) they say something like

see kill(2)

This means that the page for 'kill' it is referring to is in section 2 of the manual. There is more than one kill man page, do a

man -k kill

and see what I mean. To get the kill man page from section 2, do

man 2 kill

Other Sources

The man page system is very comprehensive, but often it's not enough. Here are some other sources you can tap on your Linux system and on the Net.

emacs Info Files
If you have the bulky and complex emacs system installed, run emacs and press the key sequence ctrl-H I and it should drop you into the emacs info browser. Some documentation contained in there is very good--for instance, on the make command.
/usr/doc Files
On all Linux distributions, there is a tremendous amount of miscellaneous documentation dumped into the /usr/doc/ directory. Each package makes its own directories under /usr/doc and puts things like FAQs and installation notes in there.
LDP
HOWTOs, FAQs and other text based files compress down well with the GNU gzip tool. To search through them without needing to uncompress first use zmore to view and zgrep to search. A handy invocation is:

zgrep -il router *

Which lists all filenames of files containing the string 'router', ignoring case.

On the Internet there are lots of sources of information. One central semi-official clearing house is the 'Linux documentation project'.

HOWTO Files
At http://sunsite.unc.edu/LDP/HOWTO/ (or an Internet mirror perhaps a little closer to you), the HOWTO files are held. There are 'HOWTO's detailing how to set up various aspects of your Linux system. Some are good, some are old and outdated, but they are worth a look because of their simple, recipe-based approach.

Summary

Hope you find what you are looking for! Be sure to check out the related items at left.

Copyright Jupitermedia Corp. All Rights Reserved.