IT lexicon › Infra & Ops › mandoc

mandoc

Infra & Ops På svenska → Updated: 2026-11-08

A small program that replaced groff for rendering manual pages, on the grounds that half a typesetting system is overkill for reading man ls.

Unix manual pages are written in roff macros, and for decades they were formatted by groff, GNU's full typesetting system in C++. In 2008 Kristaps Dzonsons started mdocml, later renamed mandoc, which understands only what manual pages actually use: the mdoc and man macro packages. The result is a fast C program with a useful linter for broken markup and output to terminal, HTML and PDF.

OpenBSD made it the default around 2010, and Ingo Schwarze eventually became lead developer. NetBSD, FreeBSD, several Linux distributions and finally macOS followed. It is a very BSD sort of project: something that worked well enough was replaced by something smaller, because someone decided well enough was not.

← Back to the lexicon