интерфейс к системным справочным руководствам (an interface to the system reference manuals)
Окружение (Environment)
MANPATH
If $MANPATH is set, its value is used as the path to
search for manual pages.
MANROFFOPT
Every time man invokes the formatter (nroff, troff, or
groff), it adds the contents of $MANROFFOPT to the
formatter's command line.
MANROFFSEQ
If $MANROFFSEQ is set, its value is used to determine the
set of preprocessors to pass each manual page through.
The default preprocessor list is system dependent.
MANSECT
If $MANSECT is set, its value is a colon-delimited list of
sections and it is used to determine which manual sections
to search and in what order. The default is "1 n l 8 3 0
2 5 4 9 6 7", unless overridden by the SECTION directive
in /usr/local/etc/man_db.conf.
MANPAGER, PAGER
If $MANPAGER or $PAGER is set ($MANPAGER is used in
preference), its value is used as the name of the program
used to display the manual page. By default, less is
used, falling back to cat if less is not found or is not
executable.
The value may be a simple command name or a command with
arguments, and may use shell quoting (backslashes, single
quotes, or double quotes). It may not use pipes to
connect multiple commands; if you need that, use a wrapper
script, which may take the file to display either as an
argument or on standard input.
MANLESS
If $MANLESS is set, its value will be used as the default
prompt string for the less pager, as if it had been passed
using the -r option (so any occurrences of the text
$MAN_PN will be expanded in the same way). For example,
if you want to set the prompt string unconditionally to
'my prompt string', set $MANLESS to '-Psmy prompt string'.
Using the -r option overrides this environment variable.
BROWSER
If $BROWSER is set, its value is a colon-delimited list of
commands, each of which in turn is used to try to start a
web browser for man --html. In each command, %s is
replaced by a filename containing the HTML output from
groff, %% is replaced by a single percent sign (%), and %c
is replaced by a colon (:).
SYSTEM If $SYSTEM is set, it will have the same effect as if it
had been specified as the argument to the -m option.
MANOPT If $MANOPT is set, it will be parsed prior to man's
command line and is expected to be in a similar format.
As all of the other man specific environment variables can
be expressed as command line options, and are thus
candidates for being included in $MANOPT it is expected
that they will become obsolete. N.B. All spaces that
should be interpreted as part of an option's argument must
be escaped.
MANWIDTH
If $MANWIDTH is set, its value is used as the line length
for which manual pages should be formatted. If it is not
set, manual pages will be formatted with a line length
appropriate to the current terminal (using the value of
$COLUMNS, and ioctl(2) if available, or falling back to 80
characters if neither is available). Cat pages will only
be saved when the default formatting can be used, that is
when the terminal line length is between 66 and 80
characters.
MAN_KEEP_FORMATTING
Normally, when output is not being directed to a terminal
(such as to a file or a pipe), formatting characters are
discarded to make it easier to read the result without
special tools. However, if $MAN_KEEP_FORMATTING is set to
any non-empty value, these formatting characters are
retained. This may be useful for wrappers around man that
can interpret formatting characters.
MAN_KEEP_STDERR
Normally, when output is being directed to a terminal
(usually to a pager), any error output from the command
used to produce formatted versions of manual pages is
discarded to avoid interfering with the pager's display.
Programs such as groff often produce relatively minor
error messages about typographical problems such as poor
alignment, which are unsightly and generally confusing
when displayed along with the manual page. However, some
users want to see them anyway, so, if $MAN_KEEP_STDERR is
set to any non-empty value, error output will be displayed
as usual.
LANG, LC_MESSAGES
Depending on system and implementation, either or both of
$LANG and $LC_MESSAGES will be interrogated for the
current message locale. man will display its messages in
that locale (if available). See setlocale(3) for precise
details.