- NetBSD Manual Pages
MAN.CONF(5) NetBSD File Formats Manual MAN.CONF(5)
Powered by man-cgi (2021-06-01).
Maintained for NetBSD
by Kimmo Suominen.
Based on man-cgi by Panagiotis Christias.
man.conf -- configuration file for manual pages
The 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(1) 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 subdirecto-
ries 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'
The man.conf file contains comment and configuration lines. Comment
lines start with the `#' character. Blank lines are also treated as com-
ment lines. Configuration lines consist of a configuration keyword fol-
lowed 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 cur-
_build Identifies the set of suffixes used for manual pages that
must be formatted for display and the command that should be
used to format them. Manual file names, regardless of their
format, are expected to end in a ``.*'' pattern, i.e. a `.'
followed by some suffix. The first field of a _build line
contains a man page suffix specification. The suffix speci-
fication may contain the normal shell globbing characters
(not including csh-style curly braces). The rest of the
_build line is a shell command line whose standard output is
a formatted manual page that can be directly displayed to the
user. There should be exactly one occurrence of the string
`%s' in the shell command line, and it will be replaced by
the name of the file which is being formatted.
_crunch Used by catman(8) to determine how to crunch formatted pages
which originally were compressed man pages. The first field
lists a suffix which indicates what kind of compression was
used to compress the man page. The rest of the line must be
a shell command line, used to compress the formatted pages.
There should be exactly one occurrence of the string `%s' in
the shell command line, and it will be replaced by the name
of the output file.
_default Contains the system-wide default man path used to search for
_mandb Defines the full pathname (not just a directory path) for a
database to be used by the apropos(1) and whatis(1) commands.
The pathname may contain the normal shell globbing charac-
ters, including csh-style curly braces; to escape a shell
globbing character, precede it with a backslash (`\').
_subdir Contains the list (in search order) of section subdirectories
which will be searched in any man path directory named with a
trailing slash (`/') character. This list is also used, even
if there is no trailing slash character, when a path is spec-
ified to the man(1) utility by the user, by the MANPATH envi-
ronment variable, or by the -M and -m options.
_suffix identifies the set of suffixes used for formatted man pages
(the `.0' suffix is normally used here). Formatted man pages
can be directly displayed to the user. Each suffix may con-
tain the normal shell globbing characters (not including csh-
style curly braces).
_version Contains the version of the configuration file.
_<machine> Defines additional paths to be searched for the particular
machine hardware name whose literal value is taken from
uname(1) -m. For example, on an amd64, the _amd64 control
keyword is used, where `x86' is supplied by default as an
alternate machine path to also search.
Section configuration lines in man.conf consist of a section keyword nam-
ing 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 csh-
style curly braces; to escape a shell globbing character, precede it with
a backslash (`\'). Section keywords must not start with the `_' charac-
A section path may contain either a list of absolute directories or a
list of 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 cur-
rent 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
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 a machine-specific subdirectory is found,
it is also searched before the parent directory is. This allows the man-
ual to contain machine-specific man pages. Note that the machine subdi-
rectory 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; mul-
tiple entries may be listed per line, as well.
/etc/man.conf Standard manual configuration file.
Given the following man.conf file:
_build .[1-9] nroff -man %s
_build .tbl tbl %s | nroff -man
By default, the command ``man mktemp'' will search for mktemp.<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 subdirec-
tory vax in each directory would be searched as well, before the direc-
tory 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.
apropos(1), machine(1), man(1), whatis(1), whereis(1), fnmatch(3),
glob(3), catman(8), makemandb(8)
NetBSD 9.99 June 18, 2022 NetBSD 9.99