---
name: "man"
section: "1"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["linux", "freebsd", "macos"]
url: "https://new.carta.tech/man"
---

# man(1)

display online manual documentation pages

## NAME

**man** – display online manual documentation pages

## SYNOPSIS

**man** \[**-adhlo**\] \[**-t** \| **-w**\] \[**-M** *manpath*\] \[**-P** *pager*\] \[**-S** *mansect*\] \[**-m** *arch*\[:*machine*\]\] \[**-p** \[*eprtv*\]\] \[*mansect*\] *page* \| *file ...*

**man** **-K** \| **-f** \| **-k** *expression* *...*

## DESCRIPTION

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:

1. FreeBSD General Commands Manual

2. FreeBSD System Calls Manual

3. FreeBSD Library Functions Manual

4. FreeBSD Kernel Interfaces Manual

5. FreeBSD File Formats Manual

6. FreeBSD Games Manual

7. FreeBSD Miscellaneous Information Manual

8. FreeBSD System Manager's Manual

9. FreeBSD Kernel Developer's Manual

Options that **man** understands:

- **-K** *expression*

  Search full text of all manual pages for an extended regular *expression*, as described in [re\_format(7)](/re_format/7.md). This option requires [mandoc(1)](/mandoc/1.md). This is a slow operation.

- **-M** *manpath*

  Force a specific colon separated manual path instead of the default search path. See MANPATH in ENVIRONMENT.

- **-P** *pager*

  Use specified pager. Defaults to ‘less -sR’ if color support is enabled, or ‘less -s’. Overrides the MANPAGER environment variable, which in turn overrides the PAGER environment variable.

- **-S** *mansect*

  Restrict manual sections searched to the specified colon delimited list. Defaults to ‘1:8:2:3:3lua:n:4:5:6:7:9:l’. Overrides the MANSECT environment variable.

- **-a**

  Display all manual pages instead of just the first found for each *page* argument.

- **-d**

  Print extra debugging information. Repeat for increased verbosity. Does not display the manual page.

- **-f** *expression*

  Search names of all manual pages for an extended regular *expression*, emulating [whatis(1)](/whatis/1.md).

- **-h**

  Display short help message and exit.

- **-k** *expression*

  Search names and descriptions of all manual pages for an extended regular *expression*, emulating basic functionality of [apropos(1)](/apropos/1.md).

- **-l**

  Interpret all arguments as absolute or relative filename(s) of the manual page(s) to display. No search is done and the options **-M**, **-m**, and **-S** are ignored.

- **-m** *arch*\[:*machine*\]

  Override the default architecture and machine settings allowing lookup of other platform specific manual pages. See IMPLEMENTATION NOTES for how this option changes the default behavior. Overrides the MACHINE\_ARCH and MACHINE environment variables.

- **-o**

  Force use of non-localized manual pages. See IMPLEMENTATION NOTES for how locale specific searches work. Overrides the LC\_ALL, LC\_CTYPE, and LANG environment variables.

- **-p** \[**eprtv**\]

  Use the list of given preprocessors before running [nroff(1)](/nroff/1.md) (*ports/textproc/groff*) or [troff(1)](/troff/1.md) (*ports/textproc/groff*). Valid preprocessors arguments:

  - **e**

    [eqn(1)](/eqn/1.md) (*ports/textproc/groff*)

  - **p**

    [pic(1)](/pic/1.md) (*ports/textproc/groff*)

  - **r**

    [refer(1)](/refer/1.md) (*ports/textproc/groff*)

  - **t**

    [tbl(1)](/tbl/1.md) (*ports/textproc/groff*)

    Overrides the MANROFFSEQ environment variable.

- **-t**

  Send manual page source through [troff(1)](/troff/1.md) (*ports/textproc/groff*) allowing transformation of the manual pages to other formats.

- **-w**

  Display the location of the manual page instead of the contents of the manual page.

## IMPLEMENTATION NOTES

### Locale Specific Searches

The **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:

-

  *lang*\_*country*.*charset*

-

  *lang*.*charset*

-

  *lang*

-

  en.*charset*

For 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*:

-

  */usr/share/man/ja\_JP.eucJP/man1*

-

  */usr/share/man/ja.eucJP/man1*

-

  */usr/share/man/ja/man1*

-

  */usr/share/man/en.eucJP/man1*

-

  */usr/share/man/man1*

### Platform Specific Searches

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*:

-

  */usr/share/man/man4/aarch64*

-

  */usr/share/man/man4/arm64*

-

  */usr/share/man/man4*

### Displaying Specific Manual Files

For compatibility reasons, **man** will interpret any argument containing at least one ‘/’ character as an absolute or relative path to a manual page to be displayed. This heuristic, made redundant by the more widely supported **-l** option, is now deprecated and may be removed in future releases.

## ENVIRONMENT

The following environment variables affect the execution of **man**:

- LC\_ALL, LC\_CTYPE, LANG

  Used to find locale specific manual pages. Valid values can be found by running the [locale(1)](/locale/1.md) command. See IMPLEMENTATION NOTES for details. Influenced by the **-o** option.

- MACHINE\_ARCH, MACHINE

  Used to find platform specific manual pages. If unset, the output of ‘sysctl *hw.machine\_arch*’ and ‘sysctl *hw.machine*’ is used respectively. See IMPLEMENTATION NOTES for details. Corresponds to the **-m** option.

- MANPATH

  A colon (‘:’) separated list of directories to check for manual pages. 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. See [manpath(1)](/manpath/1.md).

- MANROFFSEQ

  Used to determine the preprocessors for the manual source before running [nroff(1)](/nroff/1.md) (*ports/textproc/groff*) or [troff(1)](/troff/1.md) (*ports/textproc/groff*). If unset, defaults to [tbl(1)](/tbl/1.md) (*ports/textproc/groff*). Corresponds to the **-p** option.

- MANSECT

  Restricts manual sections searched to the specified colon delimited list. Corresponds to the **-S** option.

- MANWIDTH

  If set to a numeric value, used as the width manpages should be displayed. Otherwise, if set to a special value ‘tty’, and output is to a terminal, the pages may be displayed over the whole width of the screen.

- MANCOLOR

  If set, enables color support.

- MANPAGER

  Program used to display files.

  If 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.

## FILES

- */etc/man.conf*

  System configuration file

- */usr/local/etc/man.d/\*.conf*

  Local configuration files

## EXIT STATUS

The **man** utility exits 0 on success, and \>0 if an error occurs.

## EXAMPLES

Show the manual page for [stat(2)](/stat/2.md):

```
$ 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)](/ls/1.md) using [cat(1)](/cat/1.md) as the pager:

```
$ man -P cat ls
```

Show the location of the [ls(1)](/ls/1.md) manual page:

```
$ man -w ls
```

Show a manual page in the current working directory:

```
$ man -l man.1
```

Show the location of manual pages in sections 1 and 8 which contain the word ‘arm’:

```
$ man -w -K '\<arm\>' -S 1:8
```

## SEE ALSO

[apropos(1)](/apropos/1.md), [intro(1)](/intro/1.md), [mandoc(1)](/mandoc/1.md), [manpath(1)](/manpath/1.md), [whatis(1)](/whatis/1.md), [intro(2)](/intro/2.md), [intro(3)](/intro/3.md), [intro(3lua)](/intro/3lua.md), [intro(4)](/intro/4.md), [intro(5)](/intro/5.md), [man.conf(5)](/man.conf/5.md), [intro(6)](/intro/6.md), [intro(7)](/intro/7.md), [mdoc(7)](/mdoc/7.md), [re\_format(7)](/re_format/7.md), [intro(8)](/intro/8.md), [intro(9)](/intro/9.md)
