| MAN.CONF(5) | File Formats Manual | MAN.CONF(5) | 
man.conf —
man.conf file contains the default configuration
  used by man(1),
  apropos(1),
  whatis(1),
  catman(8), and
  makemandb(8) to find manual
  pages and information about manual pages (e.g. the whatis database).
Manual pages are located by searching an ordered set of directories called the “man path” for a file that matches the name of the requested page. Each directory in the search path usually has a set of subdirectories in it (though this is not required). When subdirectories are used, there are normally two subdirectories for each section of the manual. One subdirectory contains formatted copies of that section's manual pages that can be directly displayed to a terminal, while the other section subdirectory contains unformatted copies of the pages (see nroff(1) and mdoc(7)). Formatted manual pages are normally named with a trailing “.0” suffix.
The man.conf file contains comment and
    configuration lines. Comment lines start with the “#”
    character. Blank lines are also treated as comment lines. Configuration
    lines consist of a configuration keyword followed by a configuration string.
    There are two types of configuration keywords: control keywords and section
    keywords. Control keywords must start with the “_” character.
    The following control keywords are currently defined:
MANPATH environment variable, or by the
      -M and -m options.machine whose literal value is taken from
      uname(1)
      -m. For example on an
      amd64, _amd64 is
    used.Section configuration lines in man.conf
    consist of a section keyword naming the section and a configuration string
    that defines the directory or subdirectory path that the section's manual
    pages are located in. The path may contain the normal shell globbing
    characters, including curly braces (“{}”); to escape a shell
    globbing character, precede it with a backslash (“\”). Section
    keywords must not start with the “_” character.
A section path may contain either a list of absolute directories or a list of or relative directories (but not both). Relative directory paths are treated as a list of subdirectories that are appended to the current man path directory being searched. Section configuration lines with absolute directory paths (starting with “/”) completely replace the current man search path directory with their content.
Section configuration lines with absolute directory paths ending with a trailing slash character are expected to contain subdirectories of manual pages, (see the keyword “_subdir” above). The “_subdir” subdirectory list is not applied to absolute section directories if there is no trailing slash.
In addition to the above rules, the
    man(1) command also always checks
    in each directory that it searches for a subdirectory with the same name as
    the current machine type. If the machine-specific directory is found, it is
    also searched. This allows the manual to contain machine-specific man pages.
    Note that the machine subdirectory does not need to be specified in the
    man.conf file.
Multiple specifications for all types of
    man.conf configuration lines are cumulative and the
    entries are used in the order listed in the file; multiple entries may be
    listed per line, as well.
man.conf file:
_version	BSD.2
_subdir		cat[123]
_suffix		.0
_build		.[1-9]	nroff -man %s
_build		.tbl	tbl %s | nroff -man
_i386		x86
_default	/usr/share/man/
sect3		/usr/share/man/{old/,}cat3
By default, the command “man
    mktemp” will search for
    “mktemp.⟨any_digit⟩” and
    “mktemp.tbl” in the directories
    “/usr/share/man/cat1”,
    “/usr/share/man/cat2”, and
    “/usr/share/man/cat3”. If on a machine
    of type “vax”, the subdirectory “vax” in each
    directory would be searched as well, before the directory was searched.
If “mktemp.tbl” was found first, the command
    “tbl ⟨manual page⟩ | nroff
    -man” would be run to build a man page for display to the user.
The command “man sect3
    mktemp” would search the directories
    “/usr/share/man/old/cat3” and
    “/usr/share/man/cat3”, in that order,
    for the mktemp manual page. If a subdirectory with the same name as the
    current machine type existed in any of them, it would be searched as well,
    before each of them were searched.
| June 16, 2016 | NetBSD 9.4 |