Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
(Redirected from Man)


Man (short for manual) is a command-line utility available on UNIX and UNIX-like operating systems that provides documentation for programs, system calls, libraries, Special files, file formats and games.

Man pages are a form of software documentation that is downloaded locally on the users machines to be used when no internet connection is available.

Command Usage

To read a man page the user can enter the following into their terminal:[1]

man <command_name>

For example, to read the manual for man command itself:

man man

Manual Sections

The manual normally consists of eight numbered sections. Most Unix-like systems use the numbering scheme used by Research Unix.[2]

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

Layout

All Man pages follow a standardise layout designed for displaying on a simple ASCII text display.

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 declaration.
DESCRIPTION
A textual description of the functioning of the command or function. For programs, this section often includes explanations of available command line options.
EXAMPLES
Some examples of common usage.
SEE ALSO
A list of related commands or functions.[4]

Changing the Pager

The program that displays the manpage is stored in the MANPAGER or PAGER environment variable. By default, it uses less. Alternatively, the -P or --pager option can be used.[5][6]

This environment variable can be set using export PAGER="program-to-use" or added to the .bashrc or .zshrc file for persistence.

For example, using Neovim as the pager would be export PAGER="nvim +Man!", export PAGER="nano -" to use Nano, and export PAGER="less" to revert it to less.

For Fish shell, use set -x PAGER program-to-use to set it for the current session, and set -Ux PAGER program-to-use to set it globally.[7]

References