Skip to content

Man Page File Format (.man)

A MAN file is Unix manual page source, plain text marked up with the roff man macros that the man command formats into the page you read with `man <command>`.

.manDocuments

Man Page at a glance#

Full nameroff man macros
File extension.man
CategoryDocuments
First released1971
MIME typestext/troff
CompressionUncompressed
FileFlip supportFileFlip reads and writes this format

What a .man file can hold#

These are the things a Man Page file either supports or does not, and they are what decides whether a conversion keeps everything or quietly drops something.

Selectable textYes
Human readableYes

Strengths and limitations of Man Page#

What Man Page does well

  • Every Unix-like system already has a formatter for it, so a man page needs no extra software to read or print
  • The traditional numbered sections, commands, system calls, library functions and so on, give documentation a predictable place to live
  • Renders fine in a plain terminal over SSH, which is the environment it was built for

Where Man Page falls short

  • The macro syntax (.TH, .SH, .BR) is unforgiving to write by hand, which is why most projects generate man pages from another source instead
  • No support for images, and tables are limited to what troff's tbl preprocessor can lay out in monospace
  • Looks dated next to an HTML or PDF manual, since the layout is built for a fixed-width terminal

Write a man page directly when shipping a command-line tool that needs to answer to `man` on Unix-like systems.

Convert a man page to HTML or Markdown when the documentation needs to live on a website instead of a terminal.

How to open a .man file#

A .man file opens in the programs below, grouped by the platform you are on. If you would rather not install anything, FileFlip converts Man Page into a format your machine already opens, and it does it in the browser tab rather than on a server.

PlatformPrograms that open it
macOSman, Vim
Linuxman, groff, Vim
WebFileFlip

Man Page questions people ask#

How do I read a .man file?

Running `man ./file.man` or `groff -man -T utf8 file.man` renders a .man file the way the man command normally displays it. Opened directly in a text editor it shows the raw troff macros instead of formatted text.

What do the man page sections like 1, 5 and 8 mean?

Man pages are grouped into numbered sections: 1 for commands, 2 for system calls, 3 for library functions, 5 for file formats, and 8 for system administration commands, among others. The number is why `man 5 passwd` and `man 1 passwd` can point to two different pages.

Can I write a man page without learning troff?

Yes. Tools like Pandoc, help2man and ronn generate a man page from Markdown or a program's own help text, which is the normal workflow rather than writing the troff macros by hand.

Why does man output look different from a normal document?

A man page is formatted by troff's man macros for a fixed-width terminal, not a page layout engine, so it uses bold and underline instead of varied fonts, images or complex tables.

Converting Man Page files#

Every conversion runs inside your browser. The file is read from your disk, the work happens on your own machine, and nothing is uploaded. How FileFlip works names the engine behind each family and how to verify that for yourself.