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 September 26, 2014 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 61The sections of the manual are: 62.Bl -enum -offset indent -compact 63.It 64.Fx General Commands Manual 65.It 66.Fx System Calls Manual 67.It 68.Fx Library Functions Manual 69.It 70.Fx Kernel Interfaces Manual 71.It 72.Fx File Formats Manual 73.It 74.Fx Games Manual 75.It 76.Fx Miscellaneous Information Manual 77.It 78.Fx System Manager's Manual 79.It 80.Fx Kernel Developer's Manual 81.El 82.Pp 83Options that 84.Nm 85understands: 86.Bl -tag -width indent 87.It Fl M Ar manpath 88Forces a specific colon separated manual path instead of the default 89search path. 90See 91.Xr manpath 1 . 92Overrides the 93.Ev MANPATH 94environment variable. 95.It Fl P Ar pager 96Use specified pager. 97Defaults to 98.Dq Li "less -sR" 99if color support is enabled, or 100.Dq Li "more -s" . 101Overrides the 102.Ev MANPAGER 103environment variable, which in turn overrides the 104.Ev PAGER 105environment variable. 106.It Fl S Ar mansect 107Restricts manual sections searched to the specified colon delimited list. 108Defaults to 109.Dq Li 1:8:2:3:n:4:5:6:7:9:l . 110Overrides the 111.Ev MANSECT 112environment variable. 113.It Fl a 114Display all manual pages instead of just the first found for each 115.Ar page 116argument. 117.It Fl d 118Print extra debugging information. 119Repeat for increased verbosity. 120Does not display the manual page. 121.It Fl f 122Emulate 123.Xr whatis 1 . 124.It Fl h 125Display short help message and exit. 126.It Fl k 127Emulate 128.Xr apropos 1 . 129.It Fl m Ar arch Ns Op : Ns Ar machine 130Override the default architecture and machine settings allowing lookup of 131other platform specific manual pages. 132See 133.Sx IMPLEMENTATION NOTES 134for how this option changes the default behavior. 135Overrides the 136.Ev MACHINE_ARCH 137and 138.Ev MACHINE 139environment variables. 140.It Fl o 141Force use of non-localized manual pages. 142See 143.Sx IMPLEMENTATION NOTES 144for how locale specific searches work. 145Overrides the 146.Ev LC_ALL , LC_CTYPE , 147and 148.Ev LANG 149environment variables. 150.It Fl p Op Cm eprtv 151Use the list of given preprocessors before running 152.Xr nroff 1 153or 154.Xr troff 1 . 155Valid preprocessors arguments: 156.Pp 157.Bl -tag -width indent -compact 158.It Cm e 159.Xr eqn 1 160.It Cm p 161.Xr pic 1 162.It Cm r 163.Xr refer 1 164.It Cm t 165.Xr tbl 1 166.It Cm v 167.Xr vgrind 1 168.El 169.Pp 170Overrides the 171.Ev MANROFFSEQ 172environment variable. 173.It Fl t 174Send manual page source through 175.Xr troff 1 176allowing transformation of the manual pages to other formats. 177.It Fl w 178Display the location of the manual page instead of the contents of 179the manual page. 180.El 181.Sh IMPLEMENTATION NOTES 182.Ss Locale Specific Searches 183The 184.Nm 185utility supports manual pages in different locales. 186The search behavior is dictated by the first of three 187environment variables with a nonempty string: 188.Ev LC_ALL , LC_CTYPE , 189or 190.Ev LANG . 191If set, 192.Nm 193will search for locale specific manual pages using the following logic: 194.Pp 195.Bl -item -offset indent -compact 196.It 197.Va lang Ns _ Ns Va country Ns . Ns Va charset 198.It 199.Va lang Ns . Ns Va charset 200.It 201.Li en Ns . Ns Va charset 202.El 203.Pp 204For example, if 205.Ev LC_ALL 206is set to 207.Dq Li ja_JP.eucJP , 208.Nm 209will search the following paths when considering section 1 manual pages in 210.Pa /usr/share/man : 211.Pp 212.Bl -item -offset indent -compact 213.It 214.Pa /usr/share/man/ja_JP.eucJP/man1 215.It 216.Pa /usr/share/man/ja.eucJP/man1 217.It 218.Pa /usr/share/man/en.eucJP/man1 219.It 220.Pa /usr/share/man/man1 221.El 222.Ss Platform Specific Searches 223The 224.Nm 225utility supports platform specific manual pages. 226The search behavior is dictated by the 227.Fl m 228option or the 229.Ev MACHINE_ARCH 230and 231.Ev MACHINE 232environment variables. 233For example, if 234.Ev MACHINE_ARCH 235is set to 236.Dq Li i386 237and 238.Ev MACHINE 239is set to 240.Dq Li pc98 , 241.Nm 242will search the following paths when considering section 4 manual pages in 243.Pa /usr/share/man : 244.Pp 245.Bl -item -offset indent -compact 246.It 247.Pa /usr/share/man/man4/pc98 248.It 249.Pa /usr/share/man/man4/i386 250.It 251.Pa /usr/share/man/man4 252.El 253.Ss Displaying Specific Manual Files 254The 255.Nm 256utility also supports displaying a specific manual page if passed a path 257to the file as long as it contains a 258.Ql / 259character. 260.Sh ENVIRONMENT 261The following environment variables affect the execution of 262.Nm : 263.Bl -tag -width ".Ev MANROFFSEQ" 264.It Ev LC_ALL , LC_CTYPE , LANG 265Used to find locale specific manual pages. 266Valid values can be found by running the 267.Xr locale 1 268command. 269See 270.Sx IMPLEMENTATION NOTES 271for details. 272Influenced by the 273.Fl o 274option. 275.It Ev MACHINE_ARCH , MACHINE 276Used to find platform specific manual pages. 277If unset, the output of 278.Dq Li "sysctl hw.machine_arch" 279and 280.Dq Li "sysctl hw.machine" 281is used respectively. 282See 283.Sx IMPLEMENTATION NOTES 284for details. 285Corresponds to the 286.Fl m 287option. 288.It Ev MANPATH 289Used to find the location of the manual files. 290See 291.Xr manpath 1 292for additional information. 293Corresponds to the 294.Fl M 295option. 296.It Ev MANROFFSEQ 297Used to determine the preprocessors for the manual source before running 298.Xr nroff 1 299or 300.Xr troff 1 . 301If unset, defaults to 302.Xr tbl 1 . 303Corresponds to the 304.Fl p 305option. 306.It Ev MANSECT 307Restricts manual sections searched to the specified colon delimited list. 308Corresponds to the 309.Fl S 310option. 311.It Ev MANWIDTH 312If set to a numeric value, used as the width manpages should be displayed. 313Otherwise, if set to a special value 314.Dq Li tty , 315and output is to a terminal, 316the pages may be displayed over the whole width of the screen. 317.It Ev MANCOLOR 318If set, enables color support. 319.It Ev MANPAGER 320Program used to display files. 321.Pp 322If unset, and color support is enabled, 323.Dq Li "less -sR" 324is used. 325.Pp 326If unset, and color support is disabled, then 327.Ev PAGER 328is used. 329If that has no value either, 330.Dq Li "more -s" 331is used. 332.El 333.Sh FILES 334.Bl -tag -width indent -compact 335.It Pa /etc/man.conf 336System configuration file. 337.It Pa /usr/local/etc/man.d/*.conf 338Local configuration files. 339.El 340.Sh SEE ALSO 341.Xr apropos 1 , 342.Xr intro 1 , 343.Xr intro 2 , 344.Xr intro 3 , 345.Xr intro 4 , 346.Xr intro 5 , 347.Xr intro 6 , 348.Xr intro 7 , 349.Xr intro 8 , 350.Xr intro 9 , 351.Xr locale 1 , 352.Xr manpath 1 , 353.Xr nroff 1 , 354.Xr troff 1 , 355.Xr whatis 1 , 356.Xr man.conf 5 357