1c535eb59SGordon Tetlow.\"- 2c535eb59SGordon Tetlow.\" Copyright (c) 2010 Gordon Tetlow 3c535eb59SGordon Tetlow.\" All rights reserved. 4c535eb59SGordon Tetlow.\" 5c535eb59SGordon Tetlow.\" Redistribution and use in source and binary forms, with or without 6c535eb59SGordon Tetlow.\" modification, are permitted provided that the following conditions 7c535eb59SGordon Tetlow.\" are met: 8c535eb59SGordon Tetlow.\" 1. Redistributions of source code must retain the above copyright 9c535eb59SGordon Tetlow.\" notice, this list of conditions and the following disclaimer. 10c535eb59SGordon Tetlow.\" 2. Redistributions in binary form must reproduce the above copyright 11c535eb59SGordon Tetlow.\" notice, this list of conditions and the following disclaimer in the 12c535eb59SGordon Tetlow.\" documentation and/or other materials provided with the distribution. 13c535eb59SGordon Tetlow.\" 14c535eb59SGordon Tetlow.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15c535eb59SGordon Tetlow.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16c535eb59SGordon Tetlow.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17c535eb59SGordon Tetlow.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18c535eb59SGordon Tetlow.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19c535eb59SGordon Tetlow.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20c535eb59SGordon Tetlow.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21c535eb59SGordon Tetlow.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22c535eb59SGordon Tetlow.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23c535eb59SGordon Tetlow.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24c535eb59SGordon Tetlow.\" SUCH DAMAGE. 25c535eb59SGordon Tetlow.\" 26c535eb59SGordon Tetlow.\" $FreeBSD$ 27c535eb59SGordon Tetlow.\" 28*b2394e73SBaptiste Daroussin.Dd March 11, 2017 29c535eb59SGordon Tetlow.Dt MAN 1 30c535eb59SGordon Tetlow.Os 31c535eb59SGordon Tetlow.Sh NAME 32c535eb59SGordon Tetlow.Nm man 33c535eb59SGordon Tetlow.Nd display online manual documentation pages 34c535eb59SGordon Tetlow.Sh SYNOPSIS 35c535eb59SGordon Tetlow.Nm 36c535eb59SGordon Tetlow.Op Fl adho 379f0f0b4dSRuslan Ermilov.Op Fl t | w 38c535eb59SGordon Tetlow.Op Fl M Ar manpath 39c535eb59SGordon Tetlow.Op Fl P Ar pager 40c535eb59SGordon Tetlow.Op Fl S Ar mansect 41c535eb59SGordon Tetlow.Op Fl m Ar arch Ns Op : Ns Ar machine 42c535eb59SGordon Tetlow.Op Fl p Op Ar eprtv 43c535eb59SGordon Tetlow.Op Ar mansect 44c535eb59SGordon Tetlow.Ar page ... 45c535eb59SGordon Tetlow.Nm 46c535eb59SGordon Tetlow.Fl f 47c535eb59SGordon Tetlow.Ar keyword ... 48c535eb59SGordon Tetlow.Nm 49c535eb59SGordon Tetlow.Fl k 50c535eb59SGordon Tetlow.Ar keyword ... 51c535eb59SGordon Tetlow.Sh DESCRIPTION 52c535eb59SGordon TetlowThe 53c535eb59SGordon Tetlow.Nm 54c535eb59SGordon Tetlowutility finds and displays online manual documentation pages. 55c535eb59SGordon TetlowIf 56c535eb59SGordon Tetlow.Ar mansect 57c535eb59SGordon Tetlowis provided, 58c535eb59SGordon Tetlow.Nm 59c535eb59SGordon Tetlowrestricts the search to the specific section of the manual. 60c535eb59SGordon Tetlow.Pp 6184907ef0SAllan JudeThe sections of the manual are: 6284907ef0SAllan Jude.Bl -enum -offset indent -compact 6384907ef0SAllan Jude.It 64aca4343cSEdward Tomasz Napierala.Fx 65aca4343cSEdward Tomasz NapieralaGeneral Commands Manual 6684907ef0SAllan Jude.It 67aca4343cSEdward Tomasz Napierala.Fx 68aca4343cSEdward Tomasz NapieralaSystem Calls Manual 6984907ef0SAllan Jude.It 70aca4343cSEdward Tomasz Napierala.Fx 71aca4343cSEdward Tomasz NapieralaLibrary Functions Manual 7284907ef0SAllan Jude.It 73aca4343cSEdward Tomasz Napierala.Fx 74aca4343cSEdward Tomasz NapieralaKernel Interfaces Manual 7584907ef0SAllan Jude.It 76aca4343cSEdward Tomasz Napierala.Fx 77aca4343cSEdward Tomasz NapieralaFile Formats Manual 7884907ef0SAllan Jude.It 79aca4343cSEdward Tomasz Napierala.Fx 80aca4343cSEdward Tomasz NapieralaGames Manual 8184907ef0SAllan Jude.It 82aca4343cSEdward Tomasz Napierala.Fx 83aca4343cSEdward Tomasz NapieralaMiscellaneous Information Manual 8484907ef0SAllan Jude.It 85aca4343cSEdward Tomasz Napierala.Fx 86aca4343cSEdward Tomasz NapieralaSystem Manager's Manual 8784907ef0SAllan Jude.It 88aca4343cSEdward Tomasz Napierala.Fx 89aca4343cSEdward Tomasz NapieralaKernel Developer's Manual 9084907ef0SAllan Jude.El 9184907ef0SAllan Jude.Pp 92c535eb59SGordon TetlowOptions that 93c535eb59SGordon Tetlow.Nm 94c535eb59SGordon Tetlowunderstands: 95c535eb59SGordon Tetlow.Bl -tag -width indent 96c535eb59SGordon Tetlow.It Fl M Ar manpath 97c535eb59SGordon TetlowForces a specific colon separated manual path instead of the default 98c535eb59SGordon Tetlowsearch path. 99c535eb59SGordon TetlowSee 100c535eb59SGordon Tetlow.Xr manpath 1 . 101c535eb59SGordon TetlowOverrides the 102c535eb59SGordon Tetlow.Ev MANPATH 103c535eb59SGordon Tetlowenvironment variable. 104c535eb59SGordon Tetlow.It Fl P Ar pager 105c535eb59SGordon TetlowUse specified pager. 106c535eb59SGordon TetlowDefaults to 1079f0f0b4dSRuslan Ermilov.Dq Li "less -sR" 108a6a3e856SRuslan Ermilovif color support is enabled, or 1099f0f0b4dSRuslan Ermilov.Dq Li "more -s" . 110c535eb59SGordon TetlowOverrides the 111a6a3e856SRuslan Ermilov.Ev MANPAGER 112a6a3e856SRuslan Ermilovenvironment variable, which in turn overrides the 113c535eb59SGordon Tetlow.Ev PAGER 114c535eb59SGordon Tetlowenvironment variable. 115c535eb59SGordon Tetlow.It Fl S Ar mansect 116c535eb59SGordon TetlowRestricts manual sections searched to the specified colon delimited list. 117c535eb59SGordon TetlowDefaults to 11840449c74SBrooks Davis.Dq Li 1:8:2:3:n:4:5:6:7:9:l . 119c535eb59SGordon TetlowOverrides the 120c535eb59SGordon Tetlow.Ev MANSECT 121c535eb59SGordon Tetlowenvironment variable. 122c535eb59SGordon Tetlow.It Fl a 123c535eb59SGordon TetlowDisplay all manual pages instead of just the first found for each 124c535eb59SGordon Tetlow.Ar page 125c535eb59SGordon Tetlowargument. 126c535eb59SGordon Tetlow.It Fl d 127c535eb59SGordon TetlowPrint extra debugging information. 128c535eb59SGordon TetlowRepeat for increased verbosity. 129c535eb59SGordon TetlowDoes not display the manual page. 130c535eb59SGordon Tetlow.It Fl f 131c535eb59SGordon TetlowEmulate 132c535eb59SGordon Tetlow.Xr whatis 1 . 133c535eb59SGordon Tetlow.It Fl h 134c535eb59SGordon TetlowDisplay short help message and exit. 135c535eb59SGordon Tetlow.It Fl k 136c535eb59SGordon TetlowEmulate 137c535eb59SGordon Tetlow.Xr apropos 1 . 138c535eb59SGordon Tetlow.It Fl m Ar arch Ns Op : Ns Ar machine 139c535eb59SGordon TetlowOverride the default architecture and machine settings allowing lookup of 140c535eb59SGordon Tetlowother platform specific manual pages. 141c535eb59SGordon TetlowSee 142c535eb59SGordon Tetlow.Sx IMPLEMENTATION NOTES 143c535eb59SGordon Tetlowfor how this option changes the default behavior. 144c535eb59SGordon TetlowOverrides the 145c535eb59SGordon Tetlow.Ev MACHINE_ARCH 146c535eb59SGordon Tetlowand 147c535eb59SGordon Tetlow.Ev MACHINE 148c535eb59SGordon Tetlowenvironment variables. 149c535eb59SGordon Tetlow.It Fl o 150c535eb59SGordon TetlowForce use of non-localized manual pages. 151c535eb59SGordon TetlowSee 152c535eb59SGordon Tetlow.Sx IMPLEMENTATION NOTES 153c535eb59SGordon Tetlowfor how locale specific searches work. 154c535eb59SGordon TetlowOverrides the 155c535eb59SGordon Tetlow.Ev LC_ALL , LC_CTYPE , 156c535eb59SGordon Tetlowand 157c535eb59SGordon Tetlow.Ev LANG 158c535eb59SGordon Tetlowenvironment variables. 1599f0f0b4dSRuslan Ermilov.It Fl p Op Cm eprtv 160c535eb59SGordon TetlowUse the list of given preprocessors before running 161c535eb59SGordon Tetlow.Xr nroff 1 162c535eb59SGordon Tetlowor 163c535eb59SGordon Tetlow.Xr troff 1 . 164c535eb59SGordon TetlowValid preprocessors arguments: 1659f0f0b4dSRuslan Ermilov.Pp 166c535eb59SGordon Tetlow.Bl -tag -width indent -compact 167c535eb59SGordon Tetlow.It Cm e 168c535eb59SGordon Tetlow.Xr eqn 1 169c535eb59SGordon Tetlow.It Cm p 170c535eb59SGordon Tetlow.Xr pic 1 171c535eb59SGordon Tetlow.It Cm r 172c535eb59SGordon Tetlow.Xr refer 1 173c535eb59SGordon Tetlow.It Cm t 174c535eb59SGordon Tetlow.Xr tbl 1 175c535eb59SGordon Tetlow.It Cm v 176c535eb59SGordon Tetlow.Xr vgrind 1 177c535eb59SGordon Tetlow.El 1789f0f0b4dSRuslan Ermilov.Pp 179c535eb59SGordon TetlowOverrides the 180c535eb59SGordon Tetlow.Ev MANROFFSEQ 181c535eb59SGordon Tetlowenvironment variable. 182c535eb59SGordon Tetlow.It Fl t 183c535eb59SGordon TetlowSend manual page source through 184c535eb59SGordon Tetlow.Xr troff 1 185c535eb59SGordon Tetlowallowing transformation of the manual pages to other formats. 186c535eb59SGordon Tetlow.It Fl w 187c535eb59SGordon TetlowDisplay the location of the manual page instead of the contents of 188c535eb59SGordon Tetlowthe manual page. 189c535eb59SGordon Tetlow.El 190c535eb59SGordon Tetlow.Sh IMPLEMENTATION NOTES 191c535eb59SGordon Tetlow.Ss Locale Specific Searches 192c535eb59SGordon TetlowThe 193c535eb59SGordon Tetlow.Nm 194c535eb59SGordon Tetlowutility supports manual pages in different locales. 195c535eb59SGordon TetlowThe search behavior is dictated by the first of three 196c535eb59SGordon Tetlowenvironment variables with a nonempty string: 1979f0f0b4dSRuslan Ermilov.Ev LC_ALL , LC_CTYPE , 198c535eb59SGordon Tetlowor 199c535eb59SGordon Tetlow.Ev LANG . 200c535eb59SGordon TetlowIf set, 201c535eb59SGordon Tetlow.Nm 202c535eb59SGordon Tetlowwill search for locale specific manual pages using the following logic: 2039f0f0b4dSRuslan Ermilov.Pp 2049f0f0b4dSRuslan Ermilov.Bl -item -offset indent -compact 205c535eb59SGordon Tetlow.It 2069f0f0b4dSRuslan Ermilov.Va lang Ns _ Ns Va country Ns . Ns Va charset 207c535eb59SGordon Tetlow.It 2089f0f0b4dSRuslan Ermilov.Va lang Ns . Ns Va charset 209c535eb59SGordon Tetlow.It 2109f0f0b4dSRuslan Ermilov.Li en Ns . Ns Va charset 211c535eb59SGordon Tetlow.El 2129f0f0b4dSRuslan Ermilov.Pp 213c535eb59SGordon TetlowFor example, if 214c535eb59SGordon Tetlow.Ev LC_ALL 215c535eb59SGordon Tetlowis set to 2169f0f0b4dSRuslan Ermilov.Dq Li ja_JP.eucJP , 217c535eb59SGordon Tetlow.Nm 218c535eb59SGordon Tetlowwill search the following paths when considering section 1 manual pages in 219c535eb59SGordon Tetlow.Pa /usr/share/man : 2209f0f0b4dSRuslan Ermilov.Pp 2219f0f0b4dSRuslan Ermilov.Bl -item -offset indent -compact 222c535eb59SGordon Tetlow.It 223c535eb59SGordon Tetlow.Pa /usr/share/man/ja_JP.eucJP/man1 224c535eb59SGordon Tetlow.It 225c535eb59SGordon Tetlow.Pa /usr/share/man/ja.eucJP/man1 226c535eb59SGordon Tetlow.It 227c535eb59SGordon Tetlow.Pa /usr/share/man/en.eucJP/man1 228c535eb59SGordon Tetlow.It 229c535eb59SGordon Tetlow.Pa /usr/share/man/man1 230c535eb59SGordon Tetlow.El 231c535eb59SGordon Tetlow.Ss Platform Specific Searches 232c535eb59SGordon TetlowThe 233c535eb59SGordon Tetlow.Nm 234c535eb59SGordon Tetlowutility supports platform specific manual pages. 235c535eb59SGordon TetlowThe search behavior is dictated by the 236c535eb59SGordon Tetlow.Fl m 237c535eb59SGordon Tetlowoption or the 238c535eb59SGordon Tetlow.Ev MACHINE_ARCH 239c535eb59SGordon Tetlowand 240c535eb59SGordon Tetlow.Ev MACHINE 241c535eb59SGordon Tetlowenvironment variables. 242c535eb59SGordon TetlowFor example, if 243c535eb59SGordon Tetlow.Ev MACHINE_ARCH 244c535eb59SGordon Tetlowis set to 245dad206bdSEnji Cooper.Dq Li aarch64 246c535eb59SGordon Tetlowand 247c535eb59SGordon Tetlow.Ev MACHINE 248c535eb59SGordon Tetlowis set to 249dad206bdSEnji Cooper.Dq Li arm64 , 250c535eb59SGordon Tetlow.Nm 251c535eb59SGordon Tetlowwill search the following paths when considering section 4 manual pages in 252c535eb59SGordon Tetlow.Pa /usr/share/man : 2539f0f0b4dSRuslan Ermilov.Pp 2549f0f0b4dSRuslan Ermilov.Bl -item -offset indent -compact 255c535eb59SGordon Tetlow.It 256dad206bdSEnji Cooper.Pa /usr/share/man/man4/aarch64 257c535eb59SGordon Tetlow.It 258dad206bdSEnji Cooper.Pa /usr/share/man/man4/arm64 259c535eb59SGordon Tetlow.It 260c535eb59SGordon Tetlow.Pa /usr/share/man/man4 261c535eb59SGordon Tetlow.El 2623d9127f1SGordon Tetlow.Ss Displaying Specific Manual Files 2633d9127f1SGordon TetlowThe 2643d9127f1SGordon Tetlow.Nm 2653d9127f1SGordon Tetlowutility also supports displaying a specific manual page if passed a path 2663d9127f1SGordon Tetlowto the file as long as it contains a 2679f0f0b4dSRuslan Ermilov.Ql / 2683d9127f1SGordon Tetlowcharacter. 269c535eb59SGordon Tetlow.Sh ENVIRONMENT 270c535eb59SGordon TetlowThe following environment variables affect the execution of 271c535eb59SGordon Tetlow.Nm : 2729f0f0b4dSRuslan Ermilov.Bl -tag -width ".Ev MANROFFSEQ" 273c535eb59SGordon Tetlow.It Ev LC_ALL , LC_CTYPE , LANG 274c535eb59SGordon TetlowUsed to find locale specific manual pages. 275c535eb59SGordon TetlowValid values can be found by running the 276c535eb59SGordon Tetlow.Xr locale 1 277c535eb59SGordon Tetlowcommand. 278c535eb59SGordon TetlowSee 279c535eb59SGordon Tetlow.Sx IMPLEMENTATION NOTES 280c535eb59SGordon Tetlowfor details. 281c535eb59SGordon TetlowInfluenced by the 282c535eb59SGordon Tetlow.Fl o 283c535eb59SGordon Tetlowoption. 284c535eb59SGordon Tetlow.It Ev MACHINE_ARCH , MACHINE 285c535eb59SGordon TetlowUsed to find platform specific manual pages. 286c535eb59SGordon TetlowIf unset, the output of 2879f0f0b4dSRuslan Ermilov.Dq Li "sysctl hw.machine_arch" 288c535eb59SGordon Tetlowand 2899f0f0b4dSRuslan Ermilov.Dq Li "sysctl hw.machine" 290c535eb59SGordon Tetlowis used respectively. 291c535eb59SGordon TetlowSee 292c535eb59SGordon Tetlow.Sx IMPLEMENTATION NOTES 293c535eb59SGordon Tetlowfor details. 294c535eb59SGordon TetlowCorresponds to the 295c535eb59SGordon Tetlow.Fl m 296c535eb59SGordon Tetlowoption. 297c535eb59SGordon Tetlow.It Ev MANPATH 298*b2394e73SBaptiste DaroussinThe standard search path used by 299*b2394e73SBaptiste Daroussin.Xr man 1 300*b2394e73SBaptiste Daroussinmay be changed by specifying a path in the 301*b2394e73SBaptiste Daroussin.Ev MANPATH 302*b2394e73SBaptiste Daroussinenvironment variable. 303*b2394e73SBaptiste DaroussinInvalid paths, or paths without manual databases, are ignored. 304*b2394e73SBaptiste DaroussinOverridden by 305*b2394e73SBaptiste Daroussin.Fl M . 306*b2394e73SBaptiste DaroussinIf 307*b2394e73SBaptiste Daroussin.Ev MANPATH 308*b2394e73SBaptiste Daroussinbegins with a colon, it is appended to the default list; 309*b2394e73SBaptiste Daroussinif it ends with a colon, it is prepended to the default list; 310*b2394e73SBaptiste Daroussinor if it contains two adjacent colons, 311*b2394e73SBaptiste Daroussinthe standard search path is inserted between the colons. 312*b2394e73SBaptiste DaroussinIf none of these conditions are met, it overrides the 313*b2394e73SBaptiste Daroussinstandard search path. 314c535eb59SGordon Tetlow.It Ev MANROFFSEQ 315c535eb59SGordon TetlowUsed to determine the preprocessors for the manual source before running 316c535eb59SGordon Tetlow.Xr nroff 1 317c535eb59SGordon Tetlowor 318c535eb59SGordon Tetlow.Xr troff 1 . 319c535eb59SGordon TetlowIf unset, defaults to 320c535eb59SGordon Tetlow.Xr tbl 1 . 321c535eb59SGordon TetlowCorresponds to the 322c535eb59SGordon Tetlow.Fl p 323c535eb59SGordon Tetlowoption. 324c535eb59SGordon Tetlow.It Ev MANSECT 325c535eb59SGordon TetlowRestricts manual sections searched to the specified colon delimited list. 326c535eb59SGordon TetlowCorresponds to the 327c535eb59SGordon Tetlow.Fl S 328c535eb59SGordon Tetlowoption. 329a0094449SRuslan Ermilov.It Ev MANWIDTH 330a0094449SRuslan ErmilovIf set to a numeric value, used as the width manpages should be displayed. 331a0094449SRuslan ErmilovOtherwise, if set to a special value 332a0094449SRuslan Ermilov.Dq Li tty , 333a0094449SRuslan Ermilovand output is to a terminal, 334a0094449SRuslan Ermilovthe pages may be displayed over the whole width of the screen. 335a6a3e856SRuslan Ermilov.It Ev MANCOLOR 336a6a3e856SRuslan ErmilovIf set, enables color support. 337a6a3e856SRuslan Ermilov.It Ev MANPAGER 338c535eb59SGordon TetlowProgram used to display files. 339a6a3e856SRuslan Ermilov.Pp 340a6a3e856SRuslan ErmilovIf unset, and color support is enabled, 3419f0f0b4dSRuslan Ermilov.Dq Li "less -sR" 342a6a3e856SRuslan Ermilovis used. 343a6a3e856SRuslan Ermilov.Pp 344a6a3e856SRuslan ErmilovIf unset, and color support is disabled, then 345a6a3e856SRuslan Ermilov.Ev PAGER 346a6a3e856SRuslan Ermilovis used. 347a6a3e856SRuslan ErmilovIf that has no value either, 3489f0f0b4dSRuslan Ermilov.Dq Li "more -s" 349c535eb59SGordon Tetlowis used. 350c535eb59SGordon Tetlow.El 351c535eb59SGordon Tetlow.Sh FILES 352c535eb59SGordon Tetlow.Bl -tag -width indent -compact 353c535eb59SGordon Tetlow.It Pa /etc/man.conf 354c535eb59SGordon TetlowSystem configuration file. 355c535eb59SGordon Tetlow.It Pa /usr/local/etc/man.d/*.conf 356c535eb59SGordon TetlowLocal configuration files. 357c535eb59SGordon Tetlow.El 358c535eb59SGordon Tetlow.Sh SEE ALSO 359c535eb59SGordon Tetlow.Xr apropos 1 , 3609f0f0b4dSRuslan Ermilov.Xr intro 1 , 361c535eb59SGordon Tetlow.Xr locale 1 , 362c535eb59SGordon Tetlow.Xr manpath 1 , 363c535eb59SGordon Tetlow.Xr nroff 1 , 364c535eb59SGordon Tetlow.Xr troff 1 , 3659f0f0b4dSRuslan Ermilov.Xr whatis 1 , 366914f6e62SJoel Dahl.Xr intro 2 , 367914f6e62SJoel Dahl.Xr intro 3 , 368914f6e62SJoel Dahl.Xr intro 4 , 369914f6e62SJoel Dahl.Xr intro 5 , 370914f6e62SJoel Dahl.Xr man.conf 5 , 371914f6e62SJoel Dahl.Xr intro 6 , 372914f6e62SJoel Dahl.Xr intro 7 , 373914f6e62SJoel Dahl.Xr intro 8 , 374914f6e62SJoel Dahl.Xr intro 9 375