1.\"- 2.\" Copyright (c) 2010 Gordon Tetlow 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" 26.\" $FreeBSD$ 27.\" 28.Dd June 3, 2011 29.Dt MAN 1 30.Os 31.Sh NAME 32.Nm man 33.Nd display online manual documentation pages 34.Sh SYNOPSIS 35.Nm 36.Op Fl adho 37.Op Fl t | w 38.Op Fl M Ar manpath 39.Op Fl P Ar pager 40.Op Fl S Ar mansect 41.Op Fl m Ar arch Ns Op : Ns Ar machine 42.Op Fl p Op Ar eprtv 43.Op Ar mansect 44.Ar page ... 45.Nm 46.Fl f 47.Ar keyword ... 48.Nm 49.Fl k 50.Ar keyword ... 51.Sh DESCRIPTION 52The 53.Nm 54utility finds and displays online manual documentation pages. 55If 56.Ar mansect 57is provided, 58.Nm 59restricts the search to the specific section of the manual. 60.Pp 61Options that 62.Nm 63understands: 64.Bl -tag -width indent 65.It Fl M Ar manpath 66Forces a specific colon separated manual path instead of the default 67search path. 68See 69.Xr manpath 1 . 70Overrides the 71.Ev MANPATH 72environment variable. 73.It Fl P Ar pager 74Use specified pager. 75Defaults to 76.Dq Li "less -sR" 77if color support is enabled, or 78.Dq Li "more -s" . 79Overrides the 80.Ev MANPAGER 81environment variable, which in turn overrides the 82.Ev PAGER 83environment variable. 84.It Fl S Ar mansect 85Restricts manual sections searched to the specified colon delimited list. 86Defaults to 87.Dq Li 1:8:2:3:n:4:5:6:7:9:l . 88Overrides the 89.Ev MANSECT 90environment variable. 91.It Fl a 92Display all manual pages instead of just the first found for each 93.Ar page 94argument. 95.It Fl d 96Print extra debugging information. 97Repeat for increased verbosity. 98Does not display the manual page. 99.It Fl f 100Emulate 101.Xr whatis 1 . 102.It Fl h 103Display short help message and exit. 104.It Fl k 105Emulate 106.Xr apropos 1 . 107.It Fl m Ar arch Ns Op : Ns Ar machine 108Override the default architecture and machine settings allowing lookup of 109other platform specific manual pages. 110See 111.Sx IMPLEMENTATION NOTES 112for how this option changes the default behavior. 113Overrides the 114.Ev MACHINE_ARCH 115and 116.Ev MACHINE 117environment variables. 118.It Fl o 119Force use of non-localized manual pages. 120See 121.Sx IMPLEMENTATION NOTES 122for how locale specific searches work. 123Overrides the 124.Ev LC_ALL , LC_CTYPE , 125and 126.Ev LANG 127environment variables. 128.It Fl p Op Cm eprtv 129Use the list of given preprocessors before running 130.Xr nroff 1 131or 132.Xr troff 1 . 133Valid preprocessors arguments: 134.Pp 135.Bl -tag -width indent -compact 136.It Cm e 137.Xr eqn 1 138.It Cm p 139.Xr pic 1 140.It Cm r 141.Xr refer 1 142.It Cm t 143.Xr tbl 1 144.It Cm v 145.Xr vgrind 1 146.El 147.Pp 148Overrides the 149.Ev MANROFFSEQ 150environment variable. 151.It Fl t 152Send manual page source through 153.Xr troff 1 154allowing transformation of the manual pages to other formats. 155.It Fl w 156Display the location of the manual page instead of the contents of 157the manual page. 158.El 159.Sh IMPLEMENTATION NOTES 160.Ss Locale Specific Searches 161The 162.Nm 163utility supports manual pages in different locales. 164The search behavior is dictated by the first of three 165environment variables with a nonempty string: 166.Ev LC_ALL , LC_CTYPE , 167or 168.Ev LANG . 169If set, 170.Nm 171will search for locale specific manual pages using the following logic: 172.Pp 173.Bl -item -offset indent -compact 174.It 175.Va lang Ns _ Ns Va country Ns . Ns Va charset 176.It 177.Va lang Ns . Ns Va charset 178.It 179.Li en Ns . Ns Va charset 180.El 181.Pp 182For example, if 183.Ev LC_ALL 184is set to 185.Dq Li ja_JP.eucJP , 186.Nm 187will search the following paths when considering section 1 manual pages in 188.Pa /usr/share/man : 189.Pp 190.Bl -item -offset indent -compact 191.It 192.Pa /usr/share/man/ja_JP.eucJP/man1 193.It 194.Pa /usr/share/man/ja.eucJP/man1 195.It 196.Pa /usr/share/man/en.eucJP/man1 197.It 198.Pa /usr/share/man/man1 199.El 200.Ss Platform Specific Searches 201The 202.Nm 203utility supports platform specific manual pages. 204The search behavior is dictated by the 205.Fl m 206option or the 207.Ev MACHINE_ARCH 208and 209.Ev MACHINE 210environment variables. 211For example, if 212.Ev MACHINE_ARCH 213is set to 214.Dq Li i386 215and 216.Ev MACHINE 217is set to 218.Dq Li pc98 , 219.Nm 220will search the following paths when considering section 4 manual pages in 221.Pa /usr/share/man : 222.Pp 223.Bl -item -offset indent -compact 224.It 225.Pa /usr/share/man/man4/pc98 226.It 227.Pa /usr/share/man/man4/i386 228.It 229.Pa /usr/share/man/man4 230.El 231.Ss Displaying Specific Manual Files 232The 233.Nm 234utility also supports displaying a specific manual page if passed a path 235to the file as long as it contains a 236.Ql / 237character. 238.Sh ENVIRONMENT 239The following environment variables affect the execution of 240.Nm : 241.Bl -tag -width ".Ev MANROFFSEQ" 242.It Ev LC_ALL , LC_CTYPE , LANG 243Used to find locale specific manual pages. 244Valid values can be found by running the 245.Xr locale 1 246command. 247See 248.Sx IMPLEMENTATION NOTES 249for details. 250Influenced by the 251.Fl o 252option. 253.It Ev MACHINE_ARCH , MACHINE 254Used to find platform specific manual pages. 255If unset, the output of 256.Dq Li "sysctl hw.machine_arch" 257and 258.Dq Li "sysctl hw.machine" 259is used respectively. 260See 261.Sx IMPLEMENTATION NOTES 262for details. 263Corresponds to the 264.Fl m 265option. 266.It Ev MANPATH 267Used to find the location of the manual files. 268See 269.Xr manpath 1 270for additional information. 271Corresponds to the 272.Fl M 273option. 274.It Ev MANROFFSEQ 275Used to determine the preprocessors for the manual source before running 276.Xr nroff 1 277or 278.Xr troff 1 . 279If unset, defaults to 280.Xr tbl 1 . 281Corresponds to the 282.Fl p 283option. 284.It Ev MANSECT 285Restricts manual sections searched to the specified colon delimited list. 286Corresponds to the 287.Fl S 288option. 289.It Ev MANWIDTH 290If set to a numeric value, used as the width manpages should be displayed. 291Otherwise, if set to a special value 292.Dq Li tty , 293and output is to a terminal, 294the pages may be displayed over the whole width of the screen. 295.It Ev MANCOLOR 296If set, enables color support. 297.It Ev MANPAGER 298Program used to display files. 299.Pp 300If unset, and color support is enabled, 301.Dq Li "less -sR" 302is used. 303.Pp 304If unset, and color support is disabled, then 305.Ev PAGER 306is used. 307If that has no value either, 308.Dq Li "more -s" 309is used. 310.El 311.Sh FILES 312.Bl -tag -width indent -compact 313.It Pa /etc/man.conf 314System configuration file. 315.It Pa /usr/local/etc/man.d/*.conf 316Local configuration files. 317.El 318.Sh SEE ALSO 319.Xr apropos 1 , 320.Xr intro 1 , 321.Xr locale 1 , 322.Xr manpath 1 , 323.Xr nroff 1 , 324.Xr troff 1 , 325.Xr whatis 1 , 326.Xr man.conf 5 327