Linux Commands

Whatis command in Linux

In Linux, the “whatis” command is used to offer a one-line overview of command, option, or a flag. Each manual section in Linux contains some definitions. This command looks for the manual and displays the description of the given keyword.


The syntax of the “whatis” command is:

Whatis [ keyword ]

How to use whatis Command:

If you want to know about any command in Linux, enter the name of the tool or command as a parameter:

$whatis cp

How to get the information of multiple commands:

If you want to know the details about multiple commands simultaneously, enter all the names as input:

$ whatis ps rm touch mv more mkdir


Let’s discuss the various options of the “whatis” command:

1. –?-h, –help:
Use “–help” or “?” with whatis command to get help. Run any one command from them:

$ whatis -?
$ whatishelp


$whatis -h

2. D, –debug:
Use the” -d” option to get debugging information:

$ whatis -d pwd

3. -v, verbose:
Use the “-v” option to get verbose detail of a command:

$ whatis –v pwd

4. –r, regex
Each name is interpreted as a regular expression with this option. When the name matches, the connection will be made:

$ whatis –r pwd

5. -w, a wildcard

Each name is interpreted as a sequence containing shell-style wildcards with this option. An extended name should be matched to the page name:

$ whatis -w pwd

6. -l, long
This option will not trim output to suit the width of the terminal:

$ whatis -l

7. -s, –section=LIST
Use the “-s” option to check the manual sections specified. The section list is divided by a colon or a comma. If a list entry has any perspective section. Then it will display the information of a given keyword. Otherwise, it will display “nothing appropriate:

$whatis –s 4 reboot

$ whatis 2x reboot

8. -m, –system=SYSTEM
Using the “-m” NewOS option to scan for the names of NewOS’ manual page. NewOS is a Linux operating system.

$ whatis -m NewOS rmdir

9. –M, –manpath=PATH
The “-M” option allows you to browse through a different collection of colon-delimited manual page hierarchies:

$ whatis name –M --mathpath=/lib/pwd

10. -L, –locale=LOCALE
Use the “-L” option to override the given keyword temporarily. Locale is directly supplying a string to whatis:

$ whatis ps -L locale

11. –usage

This option will exit after printing quick usage information:

$ whatis --usage

12. –version

To display the version information, use “–V” with the “whatis” command option:

$ whatis -V


The “whatis” is a command that assists in getting a short explanation of any command line. It goes through the manuals of all the commands and displays a short description of the given keyword. We covered the usage of the “whatis” command and its several options.

About the author


Aqsa Maqbool

As a Software engineer, I am passionate to write about various IT related
articles but have deep interest in Linux. I spend most of my time reading Linux related blogs and IT related books. I want to serve the world with my writing skills.