Manual page


A man page (short for manual page) is a form of online software documentation usually found on a Unix or Unix-like operating system. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts. A user may invoke a man page by issuing the man command.

Usage

To read a manual page for a Unix command, one can use

man 

at a shell prompt: for example, "man ftp". In order to simplify navigation through the output, man generally uses the less terminal pager.

Pages are traditionally referred to using the notation "name(section)": for example, exit(3).

The syntax for accessing the non-default manual section varies between different man implementations. On Solaris, for example, the syntax for reading printf(3) is:

man -s 3c printf

On Linux and BSD derivatives the same invocation would be:

man 3 printf

which searches for printf in section 3 of the man pages.

History

The

The man pages were formatted using the troff typesetting package and its set of -man macros (which were completely revised between the Sixth and Seventh Editions of the Manual,[1] but have since not drastically changed). At the time, the availability of online documentation through the manual page system was regarded as a great advance. To this day, virtually every Unix command line application comes with a man page, and many Unix users perceive a program's lack of man pages as a sign of low quality; indeed, some projects, such as Debian, go out of their way to write man pages for programs lacking one. The modern descendants of 4.4BSD also distribute man pages as one of the primary forms of system documentation (having replaced the old -man macros with the newer -mdoc).

Few alternatives to man have enjoyed much popularity, with the possible exception of GNU Project's "info" system, an early and simple hypertext system. In addition, some Unix GUI applications (particularly those built using the GNOME and KDE development environments) now provide end-user documentation in HTML and include embedded HTML viewers such as yelp for reading the help within the application.

Man pages are usually written in English, but translations into other languages may be available on the system.

The default format of the man pages is troff, with either the macro package man (appearance oriented) or mdoc (semantic oriented). This makes it possible to typeset a man page into PostScript, PDF, and various other formats for viewing or printing.

Most Unix systems have a package for the man2html command, which enables users to browse their man pages using an html browser (textproc/man2html on FreeBSD or man on some Linux distribution).

In 2010, OpenBSD deprecated troff for formatting manpages in favour of mandoc, a specialised compiler/formatter for manpages with native support for output in PostScript, HTML, XHTML, and the terminal.

Manual sections

The manual is generally split into eight numbered sections, organized as follows (on Research Unix, BSD, OS X and Linux):

Section Description
1 General commands
2 System calls
3 Library functions, covering in particular the C standard library
4 Special files (usually devices, those found in /dev) and drivers
5 File formats and conventions
6 Games and screensavers
7 Miscellanea
8 System administration commands and daemons

Unix System V uses a similar numbering scheme, except in a different order:

Section Description
1 General commands
1M System administration commands and daemons
2 System calls
3 C library functions
4 File formats and conventions
5 Miscellanea
6 Games and screensavers
7 Special files (usually devices, those found in /dev) and drivers

On some systems some of the following sections are available:

Section Description
0 C library header files
9 Kernel routines
n Tcl/Tk keywords
x The X Window System

The sections are further subdivided by means of a suffix letter, such that section 3C is for C library calls, 3M is for the math library, and so on. A consequence of this is that section 8 (system administration commands) is sometimes relegated to the 1M subsection of the main commands section. Some subsection suffixes have a general meaning across sections:

Subsection Description
p POSIX specifications
x X Window System documentation

Some versions of man cache the formatted versions of the last several pages viewed.

Layout

All man pages follow a common layout that is optimized for presentation on a simple ASCII text display, possibly without any form of highlighting or font control. Sections present may include:

NAME
The name of the command or function, followed by a one-line description of what it does.
SYNOPSIS
In the case of a command, a formal description of how to run it and what command line options it takes. For program functions, a list of the parameters the function takes and which header file contains its definition. For experienced users, this may be all the documentation needed.
DESCRIPTION
A textual description of the functioning of the command or function.
EXAMPLES
Some examples of common usage.
SEE ALSO
A list of related commands or functions.

Other sections may be present, but these are not well standardized across man pages. Common examples include: OPTIONS, EXIT STATUS, ENVIRONMENT, BUGS, FILES, AUTHOR, REPORTING BUGS, HISTORY and COPYRIGHT.

See also

External links

  • original scans in PS and PDF format).
  • History of UNIX Manpages for a primary-source history of UNIX manpages.
  • Online man pages for many versions of Unix, Linux, Macintosh Darwin and similar operating systems.
  • mdoc.su — short manual page URLs for FreeBSD, NetBSD, OpenBSD and DragonFly BSD
  • man: One open-source implementation of man; used on Red Hat Enterprise Linux, Fedora (until 13), Gentoo, Slackware, Mac OS-X and others.
  • Debian/Ubuntu, SUSE and others.
  • Practical UNIX Manuals: mdoc: Guide to writing mdoc UNIX manual pages.
  • Manual
  • ManDrake: open-source man page editor for Mac OS X

References

This article is based on material taken from the Free On-line Dictionary of Computing prior to 1 November 2008 and incorporated under the "relicensing" terms of the GFDL, version 1.3 or later.

This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.