How to create a manual page in FreeBSD

Giorgos Keramidas keramida at ceid.upatras.gr
Thu Jan 12 12:07:34 PST 2006


On 2006-01-12 19:35, SPYRIDON PAPADOPOULOS <SP373 at student.apu.ac.uk> wrote:
> Hi all,
>
> Can anyone describe/give info, of how one can create a manual
> page for a custom program in FreeBSD. A manual page that would
> be accessible through the #man command. Is it possible?

Look at the existing manpages for examples, i.e.:

    /usr/src/bin/ls/ls.1

Then, you may get a good start for writing the groff source of a
manpage by copying and modifying one of the files:

$ ls -l /usr/share/examples/mdoc/*.?
-r--r--r--  1 root  wheel  - 3620 Jan 12 20:16 /usr/share/examples/mdoc/example.1
-r--r--r--  1 root  wheel  - 7658 Jan 12 20:16 /usr/share/examples/mdoc/example.3
-r--r--r--  1 root  wheel  - 3079 Jan 12 20:16 /usr/share/examples/mdoc/example.4
-r--r--r--  1 root  wheel  - 7757 Jan 12 20:16 /usr/share/examples/mdoc/example.9

The complete reference of all groff mdoc macros that you can use when
writing the document of the manpage is described in groff_mdoc(7):

    $ man groff_mdoc



More information about the freebsd-questions mailing list