| MAN(1) | MidnightBSD General Commands Manual | MAN(1) |
man — display
online manual documentation pages
man |
[-adho] [-t |
-w] [-M
manpath] [-P
pager] [-S
mansect] [-m
arch[:machine]]
[-p [eprtv]]
[mansect] page ... |
man |
-f keyword ... |
man |
-k keyword ... |
The man utility finds and displays online
manual documentation pages. If mansect is provided,
man restricts the search to the specific section of
the manual.
The sections of the manual are:
Options that man understands:
-M
manpathMANPATH environment variable.-P
pagerless
-sR” if color support is enabled, or
“less -s”. Overrides the
MANPAGER environment variable, which in turn
overrides the PAGER environment variable.-S
mansect1:8:2:3:3lua:n:4:5:6:7:9:l”.
Overrides the MANSECT environment variable.-a-d-f-h-k-m
arch[:machine]MACHINE_ARCH and MACHINE
environment variables.-oLC_ALL, LC_CTYPE, and
LANG environment variables.-p
[eprtv]Overrides the MANROFFSEQ environment
variable.
-t-wThe man utility supports manual pages in
different locales. The search behavior is dictated by the first of three
environment variables with a nonempty string:
LC_ALL, LC_CTYPE, or
LANG. If set, man will
search for locale specific manual pages using the following logic:
en.charsetFor example, if LC_ALL is set to
“ja_JP.eucJP”,
man will search the following paths when considering
section 1 manual pages in /usr/share/man:
The man utility supports platform specific
manual pages. The search behavior is dictated by the
-m option or the
MACHINE_ARCH and MACHINE
environment variables. For example, if MACHINE_ARCH
is set to “aarch64” and
MACHINE is set to
“arm64”, man
will search the following paths when considering section 4 manual pages in
/usr/share/man:
The man utility also supports displaying a
specific manual page if passed a path to the file as long as it contains a
‘/’ character.
The following environment variables affect the execution of
man:
LC_ALL,
LC_CTYPE, LANG-o
option.MACHINE_ARCH,
MACHINEsysctl hw.machine_arch” and
“sysctl hw.machine” is used
respectively. See
IMPLEMENTATION NOTES for
details. Corresponds to the -m option.MANPATHMANPATH environment
variable. Invalid paths, or paths without manual databases, are ignored.
Overridden by -M. If
MANPATH begins with a colon, it is appended to the
default list; if it ends with a colon, it is prepended to the default
list; or if it contains two adjacent colons, the standard search path is
inserted between the colons. If none of these conditions are met, it
overrides the standard search path.MANROFFSEQ-p option.MANSECT-S option.MANWIDTHtty”, and output is to a terminal,
the pages may be displayed over the whole width of the screen.MANCOLORMANPAGERIf unset, and color support is enabled,
“less -sR” is used.
If unset, and color support is disabled, then
PAGER is used. If that has no value either,
“less -s” is used.
The man utility exits 0 on success,
and >0 if an error occurs.
Show the manual page for stat(2):
$ man 2 stat
Show all manual pages for
‘stat’.
$ man -a stat
List manual pages which match the regular expression either in the title or in the body:
$ man -k '\<copy\>.*archive'
Show the manual page for ls(1) and use cat(1) as pager:
$ man -P cat ls
Show the location of the ls(1) manual page:
$ man -w ls
apropos(1), intro(1), mandoc(1), manpath(1), whatis(1), intro(2), intro(3), intro(3lua), intro(4), intro(5), man.conf(5), intro(6), intro(7), mdoc(7), intro(8), intro(9)
| January 9, 2021 | midnightbsd-4.0 |