MAN(1) General Commands Manual MAN(1)


mandisplay manual pages


man [-acfhklw] [-C file] [-I os=name] [-K encoding] [-M path] [-m path] [-O option=value] [-S subsection] [-s section] [-T output] [-W level] [section] name ...


The man utility displays the manual pages entitled name. Pages may be selected according to a specific category (section) or machine architecture (subsection).
The options are as follows:
Display all matching manual pages. Normally, only the first page found is displayed.
-C file
Use the specified file instead of the default configuration file. This permits users to configure their own manual environment. See man.conf(5) for a description of the contents of this file.
Copy the manual page to the standard output instead of using more(1) to paginate it. This is done by default if the standard output is not a terminal device.
A synonym for whatis(1). It searches for name in manual page names and displays the header lines from all matching pages. The search is case insensitive and matches whole words only. This overrides any earlier -k and -l options.
Display only the SYNOPSIS lines of the requested manual pages. Implies -a and -c.
-I os=name
Override the default operating system name for the mdoc(7) Os and for the man(7) TH macro.
-K encoding
Specify the input encoding. The supported encoding arguments are us-ascii, iso-8859-1, and utf-8. By default, the encoding is automatically detected as described in the mandoc(1) manual.
A synonym for apropos(1). Instead of name, an expression can be provided using the syntax described in the apropos(1) manual. By default, it displays the header lines of all matching pages. This overrides any earlier -f and -l options.
A synonym for mandoc(1) -a. The name arguments are interpreted as filenames. No search is done and file, path, section, and subsection are ignored. This overrides any earlier -f, -k, and -w options.
-M path
Override the list of standard directories which man searches for manual pages. The supplied path must be a colon (‘:’) separated list of directories. This search path may also be set using the environment variable MANPATH.
-m path
Augment the list of standard directories which man searches for manual pages. The supplied path must be a colon (‘:’) separated list of directories. These directories will be searched before the standard directories or the directories specified using the -M option or the MANPATH environment variable.
-O option=value
Comma-separated output options. For each output format, the available options are described in the mandoc(1) manual.
-S subsection
Restricts the directories that man will search to those of a specific machine(1) architecture. subsection is case insensitive.
By default manual pages for all architectures are installed. Therefore this option can be used to view pages for one architecture whilst using another.
This option overrides the MACHINE environment variable.
[-s] section
Only select manuals from the specified section. The currently available sections are:
General commands (tools and utilities).
System calls and error numbers.
Library functions.
perl(1) programmer's reference guide.
Device drivers.
File formats.
Miscellaneous information.
System maintenance and operation commands.
Kernel internals.
-T output
Select the output format. The default is locale. The other output modes ascii, html, lint, man, pdf, ps, tree, and utf8 are described in the mandoc(1) manual.
-W level
Specify the minimum message level to be reported on the standard error output and to affect the exit status. The level can be warning, error, or unsupp; all is an alias for warning. By default, man is silent. See the mandoc(1) manual for details.
List the pathnames of the manual pages which man would display for the specified section and name combination.
Guidelines for writing man pages can be found in mdoc(7).
If both a formatted and an unformatted version of the same manual page, for example cat1/foo.0 and man1/foo.1, exist in the same directory, and at least one of them is selected, only the newer one is used. However, if both the -a and the -w options are specified, both file names are printed.


As some manual pages are intended only for specific architectures, man searches any subdirectories, with the same name as the current architecture, in every directory which it searches. Machine specific areas are checked before general areas. The current machine type may be overridden by setting the environment variable MACHINE to the name of a specific architecture, or with the -S option. MACHINE is case insensitive.
Any non-empty value of the environment variable MANPAGER will be used instead of the standard pagination program, more(1). If less(1) is used, the interactive :t command can be used to go to the definitions of various terms, for example command line options, command modifiers, internal commands, environment variables, function names, preprocessor macros, errno(2) values, and some other emphasized words. Some terms may have defining text at more than one place. In that case, the less(1) interactive commands t and T can be used to move to the next and to the previous place providing information about the term last searched for with :t.
The standard search path used by man may be overridden by specifying a path in the MANPATH environment variable. The format of the path is a colon (‘:’) separated list of directories.
Specifies the pagination program to use when MANPAGER is not defined. If neither PAGER nor MANPAGER is defined, more(1) -s will be used.


default man configuration file


The man utility exits 0 on success, and >0 if an error occurs.


apropos(1), intro(1), whatis(1), whereis(1), intro(2), intro(3), intro(4), intro(5), man.conf(5), intro(6), intro(7), mdoc(7), intro(8), intro(9)


The man utility is compliant with the IEEE Std 1003.1-2008 (“POSIX.1”) specification.
The flags [-aCcfhIKlMmOSsTWw], as well as the environment variables MACHINE, MANPAGER, and MANPATH, are extensions to that specification.


A man command first appeared in Version 3 AT&T UNIX.
The -w option first appeared in Version 7 AT&T UNIX; -f and -k in 4BSD; -M in 4.3BSD; -a in 4.3BSD-Tahoe; -c and -m in 4.3BSD-Reno; -h in 4.3BSD-Net/2; -C in NetBSD 1.0; -s and -S in OpenBSD 2.3; and -I, -K, -l, -O, and -W in OpenBSD 5.7. The -T option first appeared in AT&T System III UNIX and was also added in OpenBSD 5.7.
January 31, 2017 OpenBSD 5.8