Next: 1.4.15 more
Up: 1.4 Man Pages
Previous: 1.4.13 ls
- - format and display the on-line manual pages
- - determine user's search path for man pages
man [-acdfhkKtwW] [-m system] [-p string] [-C config_file]
[-M path] [-P pager] [-S section_list] [section]
man formats and displays the on-line manual pages. This version knows
about the MANPATH and (MAN)PAGER environment variables, so you can
have your own set(s) of personal man pages and choose whatever program
you like to display the formatted pages. If section is specified,
man only looks in that section of the manual. You may also specify
the order to search the sections for entries and which preprocessors
to run on the source files via command line options or environment
variables. If name contains a / then it is first tried as a filename,
so that you can do man ./foo.5 or even man /cd/foo/bar.1.gz.
- config_file Specify the man.conf file to use; the default is
/etc/man.config. (See man.conf(5).)
- path Specify the list of directories to search for man pages.
If no such option is given, the environment variable MANPATH is used.
If no such environment variable is found, the default list is found
by consulting /etc/man.config. An empty substring of MANPATH denotes
the default list.
- pager Specify which pager to use. This option overrides the MANPAGER
environment variable, which in turn overrides the PAGER variable.
By default, man uses /usr/bin/less-is.
- section_list List is a colon separated list of manual sections
to search. This option overrides the MANSECT environment variable.
- By default, man will exit after displaying the first manual page
it finds. Using this option forces man to display all the manual pages
that match name, not just the first.
- Reformat the source man page, even when an up-to- date cat page
exists. This can be meaningful if the cat page was formatted for a
screen with a different number of columns, or if the preformatted
page is corrupted.
- Don't actually display the man pages, but do print gobs of debugging
- Both display and print debugging info.
- Equivalent to whatis.
- Print a one-line help message and exit.
- Equivalent to apropos.
- Search for the specified string in *all* man pages. Warning:
this is probably very slow! It helps to specify a section. (Just to
give a rough idea, on my machine this takes about a minute per 500
- system Specify an alternate set of man pages to search based
on the system name given.
- string Specify the sequence of preprocessors to run before nroff
or troff. Not all installations will have a full set of preprocessors.
Some of the preprocessors and the letters used to designate them are:
eqn (e), grap (g), pic (p), tbl (t), vgrind (v), refer (r). This option
overrides the MANROFFSEQ environment variable.
- Use /usr/bin/groff -Tps -mandoc to format the man- ual page,
passing the output to stdout. The output from /usr/bin/groff -Tps
-mandoc may need to be passed through some filter or another before
- or -path Don't actually display the man pages, but do print
the location(s) of the files that would be formatted or displayed.
If no argument is given: display (on stdout) the list of directories
that is searched by man for man pages. If manpath is a link to man,
then "manpath" is equivalent to "man -path".
- Like -w, but print file names one per line, without additional
information. This is useful in shell commands like man -aW man | xargs
- CAT PAGES
Man will try to save the formatted man pages, in order to save formatting
time the next time these pages are needed. Traditionally, formatted
versions of pages in DIR/manX are saved in DIR/catX, but other mappings
from man dir to cat dir can be specified in /etc/man.config. No cat
pages are saved when the required cat directory does not exist. It
is possible to make man suid to a user man. Then, if a cat directory
has owner man and mode 0755 (only writable by man), and the cat files
have owner man and mode 0644 or 0444 (only writable by man, or not
writable at all), no ordinary user can change the cat pages or put
other files in the cat directory. If man is not made suid, then a
cat directory should have mode 0777 if all users should be able to
leave cat pages there.
The option -c forces reformatting a page, even if a recent cat page
- If MANPATH is set, its value is used as the path to search
for manual pages.
- If MANROFFSEQ is set, its value is used to determine
the set of preprocessors run before running nroff or troff. By default,
pages are passed through the table preprocessor before nroff.
- If MANSECT is set, its value is used to determine which
manual sections to search.
- If MANWIDTH is set, its value is used as the width manpages
should be displayed. Otherwise the pages may be displayed over the
whole width of your screen.
- If MANPAGER is set, its value is used as the name of the
program to use to display the man page. If not, then PAGER is used.
If that has no value either, /usr/bin/less -is is used.
- If LANG is set, its value defines the name of the subdirectory
where man first looks for man pages. Thus, the command `LANG=dk man
1 foo' will cause man to look for the foo man page in .../dk/man1/foo.1,
and if it cannot find such a file, then in .../man1/foo.1, where ...
is a directory on the search path.
- NLSPATH, LC_MESSAGES, LANG
- The environment variables NLSPATH
and LC_MESSAGES (or LANG when the latter does not exist) play a role
in locating the message catalog. (But the English messages are compiled
in, and for English no catalog is required.) Note that programs like
col(1) called by man also use e.g. LC_CTYPE.
- PATH is used in the construction of the default search path
for man pages.
- SYSTEM is used to get the default alternate system name (for
use with the -m option).
- SEE ALSO
apropos(1), whatis(1), less(1), groff(1).
The -t option only works if a troff-like program is installed. If
you see blinking \255 or <AD> instead of hyphens, put
`LESS- CHARSET=latin1' in your environment.
Next: 1.4.15 more
Up: 1.4 Man Pages
Previous: 1.4.13 ls