Man page



A page (short for manual page) is Article description::the name for software documentation found on Unix based systems. Man pages contain documentation about programs (executable files), libraries, system calls, and configuration files.

This wiki aims to present exhaustive documentation for the Gentoo operating system, the packages, commands, and concepts that comprise it or are important for it's use. Basic documentation will be provided for notable packages from the Gentoo repository, developing specific information for getting software running and configured on Gentoo - with some pointers on basic usage, tips, and troubleshooting - for convenience. Many software projects provide comprehensive documentation themselves, delivering this in different ways, and these will be referenced from the wiki where appropriate. For many packages, the man pages will contain the canonical documentation.

Man pages are available even when a system is not connected to the Internet. The files are usually stored in but are viewed with a dedicated program, such as the  command.

In parallel to man pages is the info system. The contents of the info system is sometimes complimentary to the man pages, sometimes they will be different, sometimes only one system will contain anything at all. Man pages tend to be monolithic documents whereas info pages are hyperlinked.

Man pages are traditionally written in a special markup language called troff, but can be generated from other markup languages.

It is a real advantage to have documentation present on a system in a standardized and accessible way. Getting into the habit of looking for answers in the man and info pages is very good practice, they often contain the most complete documentation available.

Installation
Man pages should be available by default on most Gentoo installations. The package is part of the system set and should be installed by default on Gentoo systems. The package provides many basic man pages and is also part of the system set.

Localization
If localized man pages are desired, set the LINGUAS variable in, e.g. for Italian:

Pager
The command uses an external program called a pager to display the man pages. will use the PAGER environment variable (typically ) to determine what pager to use. The default pager can be modified using the command.

To use a specific pager for man, independently from the default system pager, the MANPAGER environment variable can be set.

See recommended tools for examples of pagers available on Gentoo.

This gives quite some flexibility to the man system. In addition to pagers in general, even vim can be used to display man pages. For example, for one user running bash:

See the Handbook on how to set environment variables.

Color for man pages
Man pages can be viewed in color by setting up the pager to use color.

To use to color the display or man pages, set the MANPAGER environment variable accordingly. For example, for one user running bash:

The pager  can also be used for a pleasing color output. For example:

See the Handbook on how to set environment variables.

Man pages on constrained systems
Most packages install additional man pages. This can be avoided to save small amounts of disk space, for creating embedded systems, for example. This saves very little space, and is meant for extremely constrained environments only.

It is useful to have the man pages installed, they should be omitted only if absolutely necessary.

To negate man page installation, add the following feature to :

Invocation
Man pages can be viewed using the command, typed in a terminal. For example:

Options:

A more thorough explanation of the command can be found in the Navigate sub article.

Viewing a man page
Presuming, or similar, is used as the pager, navigation of a man page can be performed using the and  arrow keys (or the  and  keys if Vim navigation is preferred). Scroll page wise with the and  keys. Search using the key followed by the search term.

Use the key to search for text when viewing a man page. After finding the first term, type for the next occurrence.

Press for more help on viewing man pages.

Press to quit.

Sections
Man pages have different sections, for when same a term is used in different domains. The sections are numbered : 1 general commands, 2 system calls, 3 library functions, 4 special files and drivers, 5 file formats and conventions, 6 games and screensavers, 7 miscellaneous, 8 system administration commands and daemons.

For example, to show the ebuild man page of section 5:

When there is more than one man page with same name, the first found will be shown. To show the ebuild man page of section 1:

To list available sections for a given term, use the  option:

Command descriptions
If all that is needed is to know what a command is, a one line description can be shown with the command (part of ):

Type in a terminal for more information.

Search
To search the man page descriptions for a keyword:

This can also be done with the apropos command, see appropriate section.

(part of ) can also search the whatis database:

Type in a terminal for more information.

Troubleshooting

 * Man says no such file or directory for less
 * No manual entry for java-config

Additional documentation

 * The command can be used to view it's own documentation: type  in a terminal for more information.
 * This is also available in the info pages:.

Additional tools

 * emacs should be able to be set up to view man pages.
 * KDE Konqueror can render man pages. Enter in the address bar   followed by the man page name, e.g.:  . To view a specific section, add the section in parentheses, e.g.:  .
 * KHelpCenter KDE documentation viewer.
 * Yelp GNOME documentation viewer.