whatis – Query What Function a Command Performs

The whatis command is used to query the manual pages for a brief description of the function of a given command. This command is particularly useful when you are unfamiliar with a command and need to get a quick overview of what it does.


The syntax for the whatis command is:

whatis [options] keyword

The keyword argument is the name of the command you want to look up. When you run the whatis command, it searches through the manual pages for a brief description of the command and prints it to the terminal.

For example, to look up the ls command, you would run:

whatis ls

This would produce output similar to the following:

ls (1) - list directory contents

The number in parentheses after the command name indicates the section of the manual where the command is documented. In this case, ls is documented in section 1 of the manual.


The following table lists the available options for the whatis command:

Option Description
-r Search for regular expressions instead of exact matches.
-s section Only search for matches in the specified manual section.
-w Search for whole words only.

Troubleshooting Tips

One common issue with the whatis command is that it may not find the command you are looking for if the command is not installed on your system. Make sure that the command you are trying to look up is installed before using the whatis command.

Another issue is that the whatis command may not find a match if the command is spelled incorrectly or if the keyword argument is not a command at all. Double-check the spelling of the command and make sure that it is a valid command before using whatis.


The whatis command is a quick and easy way to get a brief overview of what a command does. Keep in mind that the description provided by whatis is usually very brief and may not provide enough information to fully understand how to use the command. For more detailed information, you should consult the manual pages for the command.