next up previous contents
Next: Other Sources of Help Up: Getting Help Previous: Getting Help   Contents

Unix Manual Pages (the man command)

By far the most comprehensive source of unix command information is the online manual. In fact, the entire Unix Programmer's Manual is stored online. The program to access the manuals is called man. The argument passed to it (whatever else you type on the command line after the command name) is the topic you want information on. For example, if you wanted man to tell you about itself, you would type:

[bbadger@demo01] (1)$ man man

This will show the manual page on the man program itself. Be aware that man will only explain something to you if you can ask for it by name. Unfortunately, there are many occasions when you don't know what Unix calls the program you need to run. You may use apropos or man -k to find out what the system knows about some subject. For example,

[bbadger@demo01] (1)$ apropos compiler (or man -k compiler)

gcc(1) in std-14 - GNU project C and C++ compiler
g77(1) in std-14 - GNU project Fortran 77 compiler
gcj(1) in std-14 - Ahead-of-time compiler for the Java language
javac(1) in std-14 - Java compiler
jikes(1) in std-14 - java source to bytecode compiler
perlcompile(1) in std-14 - Introduction to the Perl Compiler-Translator
xsubpp(1) in std-14 - compiler to convert Perl XS code into C code
compile_et(1) in std-14 - error table compiler
ccmakedep(1) in std-14 - create dependencies in makefiles using a C compiler
gfortran(1) in sys - GNU Fortran 95 compiler
rpcgen(1) in sys - an RPC protocol compiler
yacc(1) in sys - yet another compiler compiler (DEVELOPMENT)
uil(1) in sys - The user interface language compiler
checkpolicy(8) in sys - SELinux policy compiler
zic(8) in sys - time zone compiler
...

apropos and man -k show you all the various subjects that the online manual knows concerning the topic compilers. The words gcc, javac, etc. are items that man knows about. The parenthesized number that follows the command name indicates the section of the manual where the topic can be found. You need to know this because often the same topic appears in more than one section of the manual, and you need to be able to specify which section you are interested in. The various sections and their uses are summarized in table [*]. Be aware that these commands must search through a lot of data and may be slow.


Table: Sections of Man Pages
Section Contents
1 Programs (commands)
2 System Calls
3 Subroutine libraries
4 Hardware
5 Configuration Files
6 Games
7 Miscellaneous
8 System Administration


Sections can also be divided into subsections. These subsections are denoted by one letter, and indicate which library the routine can be found in (c for compatibility, f for Fortran, m for math, etc.) You may notice that topics may appear in more than one place. To distinguish which page you want to see, you precede the name with the section. Some examples are:

[bbadger@demo01] (1)$ man 8 zic

[bbadger@demo01] (1)$ man 8v tic

Note that there is an intro page for each section (1, 2, 3, 3f, 3m, etc.) Thus if you would like to know more about math subroutines, type

[bbadger@demo01] (1)$ man 3m intro

Commands for viewing the man pages are identical to those for less. Press h for a summary of less commands.


next up previous contents
Next: Other Sources of Help Up: Getting Help Previous: Getting Help   Contents
Michelle Craft 2008-01-23