The man program

University of Wisconsin Madison

Computer Systems Lab CS1000

Wiscinfo
Wiscinfo
CS Home
CS Home
CSL
CSL
Feedback
CS1000
Feedback
Feedback

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

The man program

   

By far the most comprehensive, yet somewhat obscure source is the online manual. In fact, the entire UNIX Programmer's Manual is stored online. The trick is first learning how to access it, then learning how to read it. The program you use to access the manual is called man. It considers its arguments (whatever else you type on the command line after the command name) to be things you want help on. For example, if you wanted man to tell you about itself, you would type

vega1% 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   to find out what the system knows about some subject. For example,

vega1% apropos compiler

cc (1v)         - C compiler 
error (1)       - categorizes compiler error messages, insert at responsible 
source file names 
rpcgen (1)      - RPC protocol compiler 
tic (8v)        - terminfo compiler 
yacc (1)        - yet another compiler-compiler: parsing program generator 
zic (8)         - time zone compiler 
acc (1)         - ANSI C compiler 
f77 (1)         - Sun FORTRAN compiler 
rpcgen (1)      - RPC protocol compiler 
sbinit, sbinit (5)       - directives to Sun SourceBrowser and compilers 
yacc++ (1)      - yet another compiler-compiler: parsing program generator 
clccxref (1)    - processes one or more CenterLine-C Compiler source files and
produces a cross-reference listing on standard output 
clcp, cpp (1)   - The CenterLine-C++ Preprocessor, based on the GNU
C-Compatible Compiler Preprocessor. 
compile\_et (1) - error table compiler 
cccp, cpp (1)   - The GNU C-Compatible Compiler Preprocessor. 
g++ (1)         - GNU project C++ Compiler (v2.4)

apropos shows you all the various subjects that the online manual knows concerning the topic compilers. The words cc, gcc, acc 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 the following:

 

Sections of Man Pages
SectionContents
1Programs(commands)
2System Calls
3Subroutine Libraries
4Hardware
5Configuration Files
6Games
7Miscellaneous
8ySystem 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 it more that one place. To distinguish which page you want to see, you precede the name with the section. Some examples are:

vega1% man 8 zic

vega1% 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

vega1% man 3m intro

Commands for viewing the man page are much like those for the pager less (press h for a command summary).  



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



Caitlin Howell
Thu Jan 16 20:24:40 CST 1997