|This article needs additional citations for verification. (September 2009)|
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
To read a manual page for a Unix command, type:
The syntax for accessing the non-default manual section varies between different man implementations. On Solaris, for example, the syntax for readingis:
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.
The UNIX Programmer's Manual was first published on November 3, 1971. The first actual man pages were written by Dennis Ritchie and Ken Thompson at the insistence of their manager Doug McIlroy in 1971. Aside from the man pages, the Programmer's Manual also accumulated a set of short papers, some of them tutorials (e.g. for general Unix usage, the C programming language, and tools such as Yacc), and others more detailed descriptions of operating system features. The printed version of the manual initially fit into a single binder, but as of PWB/UNIX and the 7th Edition of Research Unix, it was split into two volumes with the printed man pages forming Volume 1.
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, 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
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.
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.
In February 2013, the BSD community saw a new open source mdoc.su service launched, which unified and shortened access to the man.cgi scripts of the major modern BSD projects through a unique nginx-based deterministic URL shortening service for the *BSD man pages.
|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|
|8||System administration commands and daemons|
Unix System V uses a similar numbering scheme, except in a different order:
|1M||System administration commands and daemons|
|3||C library functions|
|4||File formats and conventions|
|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:
|0||C library header files|
|x||The X Window System|
Some sections are further subdivided by means of a suffix; for example, in some systems, 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:
|x||X Window System documentation|
Some versions of man cache the formatted versions of the last several pages viewed.
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:
- The name of the command or function, followed by a one-line description of what it does.
- 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.
- A textual description of the functioning of the command or function.
- 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.
- List of Unix utilities
- List of Plan 9 applications
- Info (Unix)
- ManOpen - NeXT/OS X graphical man utility
- Darwin, Ian; Collyer, Geoffrey. "UNIX Evolution: 1975-1984 Part I - Diversity". Retrieved 22 December 2012. Originally published in Microsystems 5(11), November 1984.
- Pali, Gabor, ed. (12 May 2013). "FreeBSD Quarterly Status Report, January-March 2013". FreeBSD. Retrieved 25 December 2014.
- Murenin, Constantine A. (19 February 2013). "announcing mdoc.su, short manual page URLs". firstname.lastname@example.org mailing list. http://lists.freebsd.org/pipermail/freebsd-doc/2013-February/021465.html. Retrieved 25 December 2014.
- Murenin, Constantine A. (23 February 2013). "mdoc.su — Short manual page URLs for FreeBSD, OpenBSD, NetBSD and DragonFly BSD". Retrieved 25 December 2014.
- History of UNIX Manpages for a primary-source history of UNIX manpages.
- Flashnux Unix and Linux man pages, per distribution and per version - more than 186,000 man pages on September the 15th, 2014