> For the complete documentation index, see [llms.txt](https://thamizhiniyancs.gitbook.io/cheatsheets/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thamizhiniyancs.gitbook.io/cheatsheets/linux/knowing-about-files-commands/whatis.md).

# whatis

## Introduction

The `whatis` command is used to display one-line manual page descriptions.

***

## Syntax

`whatis [-dlv?V] [-r|-w] [-s list] [-m system[,...]] [-M path] [-L locale] [-C file] name ...`

***

## Important Flags

| Flag                                  | Description                                   |
| ------------------------------------- | --------------------------------------------- |
| `-d, --debug`                         | Emit debugging messages.                      |
| `-v, --verbose`                       | Print verbose warning messages.               |
| `-r, --regex`                         | Interpret each keyword as a regex.            |
| `-w, --wildcard`                      | The keyword(s) contain wildcards.             |
| `-l, --long`                          | Do not trim output to terminal width.         |
| `-C, --config-file=FILE`              | Use this user configuration file.             |
| `-L, --locale=LOCALE`                 | Define the locale for this search.            |
| `-m, --systems=SYSTEM`                | Use manual pages from other systems.          |
| `-M, --manpath=PATH`                  | Set search path for manual pages to PATH.     |
| `-s, --sections=LIST, --section=LIST` | Search only these sections (colon-separated). |
| `-?, --help`                          | Give this help list.                          |
| `--usage`                             | Give a short usage message.                   |
| `-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">whatis -h
</code></pre></td><td>Prints the help message.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">whatis -d ls
</code></pre></td><td>Prints the debugging information.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">whatis -v ls
</code></pre></td><td>Prints verbose warning messages.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">whatis -r ls
</code></pre></td><td>Supports regular expression searches.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">whatis -r '^ab'
</code></pre></td><td>Searches and displays short descriptions of commands and functions matching the regular expression '^ab'.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">whatis -r '^cd'
</code></pre></td><td>Searches and displays short descriptions of commands and functions matching the regular expression '^cd'.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">whatis -r 'cd$'
</code></pre></td><td>Searches and displays short descriptions of commands and functions matching the regular expression 'cd$'.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">whatis -w ls
</code></pre></td><td>Enables wildcard searches using the specified pattern.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">whatis -w 'ab*'
</code></pre></td><td>Searches and displays short descriptions of commands and functions matching the wildcard pattern 'ab*'.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">whatis -w 'cd*'
</code></pre></td><td>Searches and displays short descriptions of commands and functions matching the wildcard pattern 'cd*'.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">whatis -l cat
</code></pre></td><td>Displays long descriptions in addition to the summary.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">whatis -s 3 cat
</code></pre></td><td>Allows users to specify the sections from which to retrieve the information. By default, it searches all sections.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">whatis -s "1","2" cat
</code></pre></td><td>Accesses information from sections 1 and 2 of the manual page for the cat command.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">whatis -m NewOS rmdir
</code></pre></td><td>Accesses manual page names for other operating systems.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">whatis -m OS2 rmdir
</code></pre></td><td>Accesses the short description of the rmdir command from the OS2 manual pages.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">whatis cd -M --manpath=/lib/cd
</code></pre></td><td>Specifies an alternate set of colon-delimited manual page hierarchies to search. It overrides the default value of the $MANPATH environment variable.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">whatis rm -L locale
</code></pre></td><td>Temporarily overrides the determined locale value, allowing users to supply a locale string directly to the 'whatis' command.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">whatis -C file
</code></pre></td><td>Specifies a user configuration file for the 'whatis' command, overriding the default configuration file location ~/.manpath.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">whatis -?
</code></pre></td><td>Prints a help message.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">whatis --usage
</code></pre></td><td>Displays short information about the whatis command and exits.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">whatis -V
</code></pre></td><td>Displays version information.</td></tr><tr><td><pre class="language-bash" data-overflow="wrap"><code class="lang-bash">whatis ssh-import-id
</code></pre></td><td>Displays the trimmed output of the ssh-import-id command.</td></tr></tbody></table>
