form Intro.1.html:
Pages of special interest are categorized as follows:
1B Commands found only in the SunOS/BSD Compatibility Package. Refer to the Source Compatibility Guide for more information.
1C Commands for communicating with other systems.
1F Commands associated with Form and Menu Language Interpreter (FMLI).
1S Commands specific to the SunOS system.
OTHER SECTIONS See these sections of the man Pages(1M): System Administra- tion Commands for more information.
o Section 1M in this manual for system maintenance com- mands.
o Section 4 of this manual for information on file formats.
o Section 5 of this manual for descriptions of publicly available files and miscellaneous information pages.
o Section 6 in this manual for computer demonstrations.
choose section
$ man printf -- show man for PRINTF(1)
$ man -al printf printf (1) -M /opt/gnu/man printf (1) -M /usr/man printf (3s) -M /usr/man printf (3b) -M /usr/man printf (1) -M /usr/share/man printf (3s) -M /usr/share/man printf (3b) -M /usr/share/man
$ man -s 3s printf -- show man for Standard C I/O Functions
choose path
$ man -al test test (1) -M /opt/gnu/man test (1) -M /usr/man test (1f) -M /usr/man test (1b) -M /usr/man test (1) -M /usr/share/man test (1f) -M /usr/share/man test (1b) -M /usr/share/man
$ man -M /usr/man test -- show man other than default gnu version
-a Show all manual pages matching name within the MANPATH search path. Manual pages are displayed in the order found.
-l List all manual pages found matching name within the search path.
-s section ... Specify sections of the manual for man to search. The directories searched for name is limited to those specified by section. section can be a digit (perhaps followed by one or more letters), a word (for example: local, new, old, public), or a letter. To specify multiple sections, separate each section with a comma. This option overrides the MANPATH environment variable and the man.cf file. See Search Path below for an explanation of how man conducts its search.
-M path Specify an alternate search path for manual pages. This option overrides the MANPATH environment variable.
-d Debug. Displays what a section-specifier evalu- ates to, method used for searching, and paths searched by man.
In Linux, when man looks for a man page for a particular command, it will consult the current PATH value. Searching from the first path in PATH till the last one, man will adds the following suffix to the path, and probes the possible existence of the man directories.
/man /MAN /../man /../man1 /../man8
If you have different version of command in different path, this approach will guarantee that the man page you get is the executable that you'll execute.
Note that in RH, there is no man directories related with sbin directories (e.g., /sbin, /usr/sbin, etc). The man page for sbin tools are in man8 directories. For example, the man page for mkswap, which is under /sbin, is at /usr/share/man/man8/mkswap.8.gz.
the default list is in /etc/man.config. But it is generated automatically from man.conf.in by the configure script. So better change the profile.
An empty substring of MANPATH denotes the default list!
So set it like this:
MANPATH=::/usr/share/man:/opt/man