# apropos

## Introduction

The `apropos` command is used to search the manual page names and descriptions.

***

## Syntax

`apropos [-dalv?V] [-e|-w|-r] [-s list] [-m system[,...]] [-M path] [-L locale] [-C file] keyword ...`

***

## Important Flags

| Flag                                         | Description                                                                                 |
| -------------------------------------------- | ------------------------------------------------------------------------------------------- |
| `whatis -d, --debug`                         | Prints debugging messages.                                                                  |
| `whatis -v, --verbose`                       | Print verbose warning messages.                                                             |
| `whatis -e, --exact`                         | Search each keyword for exact match.                                                        |
| `whatis -r, --regex`                         | Interpret each keyword as a regex.                                                          |
| `whatis -w, --wildcard`                      | The keyword(s) contain wildcards.                                                           |
| `whatis -a, --and`                           | Require all keywords to match.                                                              |
| `whatis -l, --long`                          | Do not trim output to terminal width.                                                       |
| `whatis -C, --config-file=FILE`              | Uses user-configuration files instead of the $MANPATH.                                      |
| `whatis -L, --locale=LOCALE`                 | Define the locale for this search.                                                          |
| `whatis -m, --systems=SYSTEM`                | Use manual pages from other systems. Looks for man page descriptions from other OSs.        |
| `whatis -M, --manpath=PATH`                  | Sets the search path to PATH rather than the default $MANPATH.                              |
| `whatis -s, --sections=LIST, --section=LIST` | Search only these sections (colon-separated). Searches only in specific man pages sections. |
| `whatis -?, --help`                          | Give this help list.                                                                        |
| `whatis --usage`                             | Give a short usage message.                                                                 |
| `whatis -V, --version`                       | Print program version.                                                                      |

***

## Examples

<table><thead><tr><th>Command</th><th>Description</th></tr></thead><tbody><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">apropos list
</code></pre></td><td>The apropos primary usage is to find a single keyword in man pages.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">apropos -a list directory
</code></pre></td><td>Add another variable to narrow down the matches.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">apropos "list directory"
</code></pre></td><td>Achieve a similar effect without `-a` by encasing keywords in double quotes.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">apropos delete terminate remove
</code></pre></td><td>Find Either of Two / More Parameters</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">apropos -e set
</code></pre></td><td>Find Exact Match</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">apropos -s 1,8 list
</code></pre></td><td>Search Specific Sections</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">apropos '^list'
</code></pre></td><td>Use Regex Symbols</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">apropos "zip(note|cloak|info)"
</code></pre></td><td>Use regex to conduct an even more specific search.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">apropos -a -s 3,8 "^list" "(implementation|devices|users)"
</code></pre></td><td>As the output shows, each line includes list at the beginning, belongs to section 3 or 8, and has one of the keywords.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">apropos list -l
</code></pre></td><td>To avoid the trimming of descriptions in apropos command output</td></tr></tbody></table>
