mandoc(1) on Solnix vs Linux and the BSDs

On Solnix, mandoc is the illumos build at /usr/bin/mandoc, published in pkgs.solnix.illumos-world-man. Its core options (-a, -c, -I, -K, -T, -O, -W) read the same as on FreeBSD, OpenBSD and NetBSD. The Solnix page does not document the man/apropos-style -f, -h, -k, -l and -w modes that all three BSD pages list.

What Solnix runs

A default Solnix system runs the illumos mandoc at /usr/bin/mandoc. No other variants are shipped. The bundle contains no Linux counterpart page, so nothing is compared with Linux.

Differences

Compared withTopicWhat differs
FreeBSD, OpenBSD, NetBSD-f -h -k -l -w modesThe FreeBSD, OpenBSD and NetBSD pages say -fhklw are also supported, documented in man(1), and that -f and -k accept the apropos(1) options -CMmOSs. The Solnix page has no such paragraph, so those modes are undocumented there.
Source: FreeBSD/OpenBSD/NetBSD mandoc(1) DESCRIPTION (paragraph after 'file'); Solnix mandoc(1) DESCRIPTION and SYNOPSIS
FreeBSD, OpenBSD-O mdoc for ASCII outputSolnix accepts -O mdoc, which formats man(7) input in mdoc(7) style. It prints the OS name in the footer and implies -O indent=5. The FreeBSD and OpenBSD ASCII Output sections list only indent, tag and width. NetBSD documents -O mdoc like Solnix.
Source: Solnix mandoc(1) ASCII Output -O mdoc; NetBSD mandoc(1) ASCII Output -O mdoc; FreeBSD/OpenBSD mandoc(1) ASCII Output -O arguments
FreeBSD, OpenBSD-O indent defaultSolnix sets the default left margin to five for mdoc(7) pages and seven for man(7) pages. FreeBSD and OpenBSD document a single default of five. NetBSD matches Solnix.
Source: Solnix mandoc(1) -O indent=indent; NetBSD mandoc(1) -O indent=indent; FreeBSD/OpenBSD mandoc(1) -O indent=indent
OpenBSD-T pdf and -T psSolnix lists pdf and ps among the supported -T values. OpenBSD omits them from that list and says experimental, low-quality ps and pdf output formats are also available.
Source: Solnix mandoc(1) -T output; OpenBSD mandoc(1) -T output
FreeBSD, OpenBSD, NetBSD-T default and pager behaviourThese behave the same on Solnix and all three BSDs. The default output is -T locale, and -c (copy to stdout without less(1)) is the default. -a pages output only when stdout is a terminal.
Source: Solnix and FreeBSD/OpenBSD/NetBSD mandoc(1) DESCRIPTION, -a, -c, -T
FreeBSD, OpenBSD, NetBSD-W levels and exit statusThe -W levels (base, style, warning, error, unsupp, plus openbsd, netbsd, all and stop) are described identically on all four systems. By default mandoc is silent. -T lint implies -W all and sends parser messages to stdout.
Source: Solnix mandoc(1) -W level, -T output; FreeBSD/OpenBSD/NetBSD mandoc(1) -W level, -T output
FreeBSD, OpenBSD, NetBSDinput encoding autodetection-K encoding accepts us-ascii, iso-8859-1 and utf-8. Autodetection tries a UTF-8 byte order mark, then an emacs coding: line, then valid UTF-8, then falls back to iso-8859-1. This is the same on all four systems.
Source: Solnix mandoc(1) -K encoding; FreeBSD/OpenBSD/NetBSD mandoc(1) -K encoding

Standards

  • POSIX: mandoc is not a POSIX.1-2024 utility.

Writing portable scripts

  • Stick to -T ascii, -T utf8, -T html, -T man, -T markdown and -T lint, which every page lists. Avoid -T pdf and -T ps on OpenBSD, where they are experimental.
  • Do not rely on -f, -k, -l, -h or -w with mandoc on Solnix. Its page does not document them, so use man(1) and apropos(1) for lookups.

Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.