What Are the Man Pages?

Man pages are Linux’s inbuilt help system for referring to commands and other technical and usage details. Man pages stands for ‘Manual pages’ and it is an extensive and comprehensive documentation system available for Linux systems. There is one man page for each and every Linux command and this man page is a self-contained document addressing all the aspects and usage of the command.

The History of Man Pages

The history of man pages goes beyond the age of Linux. The first man page was written for UNIX back in 1971. It was then called UNIX Programmer’s Manual. In this era, there was no Internet for referencing. Therefore, having such man pages considered as one of the best features of UNIX and UNIX-like systems. Since UNIX was the only operating platform, which offered such man pages, UNIX was regarded as having an edge over other operating platforms. From 1971 onwards, up to today, every UNIX command comes with its own man page. If there are applications or command without properly structured man pages, these commands or programs are considered as low quality. Some distribution of Linux, such as Debian, writes their own man pages for the commands or programs that are lacking proper man pages. As an alternative to man pages, some applications have introduced “info” referencing system with some popularity among the users.

There have been multiple issues related to the man pages. First of all, it is a single long page for each application. This is quite usable when it comes to simpler commands and applications where man page is just a couple of screens. But the man page starts become complicated when it is a command with a lot of options or a complex program. It is quite inconvenient for a user to browse through the entire page in order to find the information required. In addition to that, lack of proper formatting makes it harder for use. These are just a few reasons why there have been a number of alternative systems for man pages.

In addition to the alternatives such as “info”, the Linux GUI applications that come with Gnome and KDE desktop environments provide comprehensive help system through HTML. During recent past, such help systems have been able to gain the popularity among the beginner or intermediate Linux users. Some of the modern Linux distributions offer tools such as man2html, where users can use HTML browsers to read man pages. In the usability front, this is a great facility.

As a tradition, the man pages have been written in English. Depending on the Linux distribution, these man pages have been translated to other languages as well.

The Organization of Man Pages

Man pages are divided into eight main sections. Each section is represented by a number and this structure is available for UNIX, BSD, and Linux.

  • Section 1: General commands
  • Section 2: UNIX system calls
  • Section 3: Library functions for C language
  • Section 4: Special files such as devices and drivers
  • Section 5: Different file formats and conversions
  • Section 6: Screensavers and games
  • Section 7: Misc applications and commands
  • Section 8: System admin commands and daemons

In addition to the standard 8 sections for man pages, some UNIX like systems include the following man page sections to their man page collection.

  • Section 0: Header files for C library
  • Section 9: Kernel routines
  • Section n: Tcl/Tk
  • Section x: The X windows system related man pages

The Layout of a Man Page

There are five main sections in a man page. All the man pages that have been written follow this standard from 1971. This format is optimized for simple viewing and it is a simple ASCII text presentation. Usually, these man pages do not carry any form of font formatting or highlighting. But there are a few exceptions to this rule.

Following is the section breakdown of a man page.

NAME

This mentions the name of the command or the function addressed by the man page. The name is usually accompanied by one-line description of the functionality of the command or function.

SYNOPSIS

If the man page is about a command, this section describes the features of the command. This usually includes the steps to run the command and description of when to run. In addition, if the command has operators or options, this section describe each option / operator with a brief description of each. If the man page is for a program function, the parameters used in the function are described here. Since this section describes all what is needed to use a command or a function, this is the only section required by an experienced user.

DESCRIPTION

This section presents a textual description on the functioning of the function or the command. This helps the beginners to understand how the command or the function works in high level.

EXAMPLES

Perhaps this is the most user friendly section of the man page. Although a user can have a good understanding of the command or the function through SYNOPSIS and DESCRIPTION, this section is the one that shows the practical usage. Most of the beginner users are used to just copy-and-paste the commands and functions from this section of the man page when it comes to scripting. Therefore, EXAMPLES section can be considered as one of the most important sections of the man pages.

SEE ALSO

Every Linux (or UNIX) command has many other related commands. This section illustrates the related commands and functions. The user maybe able to benefit from this information, as he/she can find alternative commands or functions for what they want to do.

Man page for Man Command

Man page for Man Command

In addition the 5 main sections, there are other sections that can be found in man pages. These sections are not compulsory sections; so adding these sections is up to the author of the man page. Therefore, one cannot expect to see the following sections in the next man page that the person is going to refer. Following are the optional section of man pages.

OPTIONS

ENVIRONMENT

AUTHOR

KNOWN BUGS / ISSUES

HISTORY

COPYRIGHT INFORMATION

Comments

comments

Leave a Reply