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 | Fl 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.Ic "less -sR" 77if color support is enabled, or 78.Ic "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.Va 1:1aout: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 Ar eprtv 129Use the list of given preprocessors before running 130.Xr nroff 1 131or 132.Xr troff 1 . 133Valid preprocessors arguments: 134.Bl -tag -width indent -compact 135.It Cm e 136.Xr eqn 1 137.It Cm p 138.Xr pic 1 139.It Cm r 140.Xr refer 1 141.It Cm t 142.Xr tbl 1 143.It Cm v 144.Xr vgrind 1 145.El 146Overrides the 147.Ev MANROFFSEQ 148environment variable. 149.It Fl t 150Send manual page source through 151.Xr troff 1 152allowing transformation of the manual pages to other formats. 153.It Fl w 154Display the location of the manual page instead of the contents of 155the manual page. 156.El 157.Sh IMPLEMENTATION NOTES 158.Ss Locale Specific Searches 159The 160.Nm 161utility supports manual pages in different locales. 162The search behavior is dictated by the first of three 163environment variables with a nonempty string: 164.Ev LC_ALL , 165.Ev LC_CTYPE , 166or 167.Ev LANG . 168If set, 169.Nm 170will search for locale specific manual pages using the following logic: 171.Bl -item -compact -offset indent 172.Sm off 173.It 174.Va lang _ 175.Va country . 176.Va charset 177.It 178.Va lang . 179.Va charset 180.It 181.Li en . 182.Va charset 183.Sm on 184.El 185For example, if 186.Ev LC_ALL 187is set to 188.Va ja_JP.eucJP , 189.Nm 190will search the following paths when considering section 1 manual pages in 191.Pa /usr/share/man : 192.Bl -item -compact -offset indent 193.It 194.Pa /usr/share/man/ja_JP.eucJP/man1 195.It 196.Pa /usr/share/man/ja.eucJP/man1 197.It 198.Pa /usr/share/man/en.eucJP/man1 199.It 200.Pa /usr/share/man/man1 201.El 202.Ss Platform Specific Searches 203The 204.Nm 205utility supports platform specific manual pages. 206The search behavior is dictated by the 207.Fl m 208option or the 209.Ev MACHINE_ARCH 210and 211.Ev MACHINE 212environment variables. 213For example, if 214.Ev MACHINE_ARCH 215is set to 216.Va i386 217and 218.Ev MACHINE 219is set to 220.Va pc98 , 221.Nm 222will search the following paths when considering section 4 manual pages in 223.Pa /usr/share/man : 224.Bl -item -compact -offset indent 225.It 226.Pa /usr/share/man/man4/pc98 227.It 228.Pa /usr/share/man/man4/i386 229.It 230.Pa /usr/share/man/man4 231.El 232.Ss Displaying Specific Manual Files 233The 234.Nm 235utility also supports displaying a specific manual page if passed a path 236to the file as long as it contains a 237.Sq / 238character. 239.Sh ENVIRONMENT 240The following environment variables affect the execution of 241.Nm : 242.Bl -tag -width ".Ev MANPATH" 243.It Ev LC_ALL , LC_CTYPE , LANG 244Used to find locale specific manual pages. 245Valid values can be found by running the 246.Xr locale 1 247command. 248See 249.Sx IMPLEMENTATION NOTES 250for details. 251Influenced by the 252.Fl o 253option. 254.It Ev MACHINE_ARCH , MACHINE 255Used to find platform specific manual pages. 256If unset, the output of 257.Ic "sysctl hw.machine_arch" 258and 259.Ic "sysctl hw.machine" 260is used respectively. 261See 262.Sx IMPLEMENTATION NOTES 263for details. 264Corresponds to the 265.Fl m 266option. 267.It Ev MANPATH 268Used to find the location of the manual files. 269See 270.Xr manpath 1 271for additional information. 272Corresponds to the 273.Fl M 274option. 275.It Ev MANROFFSEQ 276Used to determine the preprocessors for the manual source before running 277.Xr nroff 1 278or 279.Xr troff 1 . 280If unset, defaults to 281.Xr tbl 1 . 282Corresponds to the 283.Fl p 284option. 285.It Ev MANSECT 286Restricts manual sections searched to the specified colon delimited list. 287Corresponds to the 288.Fl S 289option. 290.It Ev MANWIDTH 291If set to a numeric value, used as the width manpages should be displayed. 292Otherwise, if set to a special value 293.Dq Li tty , 294and output is to a terminal, 295the pages may be displayed over the whole width of the screen. 296.It Ev MANCOLOR 297If set, enables color support. 298.It Ev MANPAGER 299Program used to display files. 300.Pp 301If unset, and color support is enabled, 302.Ic "less -sR" 303is used. 304.Pp 305If unset, and color support is disabled, then 306.Ev PAGER 307is used. 308If that has no value either, 309.Ic "more -s" 310is used. 311.El 312.Sh FILES 313.Bl -tag -width indent -compact 314.It Pa /etc/man.conf 315System configuration file. 316.It Pa /usr/local/etc/man.d/*.conf 317Local configuration files. 318.El 319.Sh SEE ALSO 320.Xr intro 1 , 321.Xr apropos 1 , 322.Xr locale 1 , 323.Xr manpath 1 , 324.Xr man.conf 5 , 325.Xr nroff 1 , 326.Xr troff 1 , 327.Xr whatis 1 328