MAN.CONF(5)

πŸ“¦
version 1.14.6 Β· 3 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– MAN.CONF(5) πŸ’–

okay bestie, welcome to the file formats manual section, we're doing man.conf today and honestly? it's giving lowkey iconic config energy πŸŽ€


✨ NAME ✨

man.conf β€” the configuration file for man 🌸


🌈 DESCRIPTION 🌈

So. This is the configuration file for the man(1), apropos(1), and makewhatis(8) utilities. And here's the tea: its presence, AND all of its directives, are completely optional. She doesn't have to show up. If she doesn't, everything still works. Main character behaviour tbh πŸ’…

This file is an ASCII text file. Leading whitespace on lines, lines starting with #, and blank lines are all ignored β€” like, they simply do not exist to her. Words are separated by whitespace. And the first word on each line is the name of a configuration directive. Periodt.

The following directives are supported, bestie, let's go one by one 🫢

manpath path

Override the default search path for man(1), apropos(1), and makewhatis(8). You can use it multiple times to specify multiple paths, and the order you list them in determines the manual page search order. So like, first one wins. Ranking matters πŸ’…

Each path is a tree containing subdirectories whose names consist of the strings man and/or cat followed by the names of sections, usually single digits. The man ones are supposed to contain unformatted manual pages in mdoc(7) and/or man(7) format, and their file names should end with the name of the section preceded by a dot. The cat ones should contain preformatted manual pages, and their file names should end with .0.

Creating a mandoc.db(5) database with makewhatis(8) in each directory configured with manpath is recommended, and it's necessary for apropos(1) to work β€” and also for man(1) on operating systems like OpenBSD that install each manual page with only one file name in the file system, even if it documents multiple utilities or functions. So yeah, run your makewhatis, bestie, don't skip leg day 😭

output option [value]

Configure the default value of an output option. These directives get overridden by the -O command line options of the same names β€” so command line always wins, no cap. For details, see the mandoc(1) manual.

The options are:

  • fragment β€” value: none, used by -T html, purpose: print only body
  • includes β€” value: string, used by -T html, purpose: path to header files
  • indent β€” value: integer, used by -T ascii, utf8, purpose: left margin
  • man β€” value: string, used by -T html, purpose: path for Xr links
  • paper β€” value: string, used by -T ps, pdf, purpose: paper size
  • style β€” value: string, used by -T html, purpose: CSS file
  • toc β€” value: none, used by -T html, purpose: print table of contents
  • width β€” value: integer, used by -T ascii, utf8, purpose: right margin

πŸŽ€ FILES πŸŽ€

  • /etc/man.conf

πŸ¦‹ EXAMPLES πŸ¦‹

okay this part is so satisfying. The following configuration file reproduces the defaults β€” meaning installing it is literally equivalent to not having a man.conf file at all. Same vibe, zero difference, it's giving "I did nothing and it worked" πŸ’€

manpath /usr/share/man
manpath /usr/X11R6/man
manpath /usr/local/man

⭐ SEE ALSO ⭐

apropos(1), man(1), makewhatis(8)

go read them, they're all in the group chat πŸ“šβœ¨


🌸 HISTORY 🌸

A relatively complicated man.conf file format first appeared in 4.3BSD-Reno. Then, for OpenBSD 5.8, it was redesigned from scratch, aiming for simplicity. A glow-up, honestly. She reinvented herself πŸ’…βœ¨


πŸ‘‘ AUTHORS πŸ‘‘

Ingo Schwarze <schwarze@openbsd.org> β€” thank you for your service, king 🫑


and that's the whole page bestie!! πŸŽ€ this one's from the Debian fam, dated February 10, 2020 β€” mwah, love that for us πŸ’–βœ¨πŸ¦‹