When you are looking for general help on commands and error messages, the best place to start is right on your system.
Most every command on your system has an associated ``man'' page. This
is documentation that you can get to instantly should you have questions
or problems. If you were having trouble with the command ls
, you
could enter man ls
. This will bring up the man page for ls
.
The man page is viewed through the less
program, so all of the
options to less
will work while in a man page. Some important
key strokes are:
q
to quitEnter
to page down line by lineSpace
to page down page by pageb
to page back up by one page/
followed by a string and Enter
to search for
a stringn
to find the next occurance of the previous searchSometimes viewing man pages isn't too friendly on line. Providing you
have a working printer, you can print man pages as well. If you don't
have postscript printing capability and just want to print ASCII, you
can print man pages with man COMMAND | groff -mandoc -Tascii | lpr
.
If you do have a postscript printer, you will probably want to print
with man COMMAND | groff -mandoc | lpr
. In both of
those commands substitute ``COMMAND'' for the command you are trying
to get help for.
Many packages of software have READMEs and other documentation as part
of the source package. We have come up with a standard place to install
those documents for you so that you don't have to install the sources
to look at the documents. All of those documents are stored in subdirectories
of /usr/doc
. The subdirectory depends on the package. Each package
that has extra documentation will create a directory called
packagename-version-releasenumber. For example, the tin package might
be version 1.22 and release number 2. The path to its documentation would
be /usr/doc/tin-1.22-2
.
For the most part, the documents in this directory are ASCII. You can usually
for them with more filename
or less filename
.
This is nice, but what if you want to see if there is documentation for a specific command or file and you don't know the package it came from? It doesn't matter! You can simply do:
rpm -qdf /etc/sendmail.cf
This will report all the documentation from the package containing the
file /etc/sendmail.cf
. Commands like this are covered more in
depth in the RPM-HOWTO, most likely available wherever you got this
document.
Also, what if it's a command you need help with and the man page isn't good? You could do something like:
rpm -qdf `which COMMAND`
Again, where ``COMMAND'' is the actual command you need help with. This will only work when the command is on your path.
Most of the contents of the Linux Documentation Project (LDP) are
available in /usr/doc
on your system.
/usr/doc/HOWTO
contains the ASCII versions of all the available
HOWTOs at the time we pressed the CD-ROM. They are gzipped, so you will
have to use gunzip
to unzip them or you will have to use something
like zcat HAM-HOWTO.gz | more
. The latter will work, but is
a bit less flexible than unzipping and then using more
. It also
requires more disk space unless you re-gzip the document when done.
/usr/doc/HOWTO/mini
contains the ASCII versions of all the
available mini-HOWTOs. They are not compressed and can be viewed
with more
or less
.
/usr/doc/HTML
contains the HTML versions of all the HOWTOs and
the _Linux Installation and Getting Started_ guide. To view things
here, just use a WWW browser (like lynx
or Mosaic
). You
would do something like:
cd /usr/doc/HTML
lynx index.html
/usr/doc/FAQ
contains ASCII version (and some HTML versions)
of some popular FAQs, including the RedHat-FAQ. All of them can be
viewed using more
or less
.
Next Chapter, Previous Chapter
Table of contents of this chapter, General table of contents
Top of the document, Beginning of this Chapter