It’s quite similar to “man” except this command only prints the one line description of the given command. It’s handy to get what’s the command is for without the additional details.
General syntax for
whatis [OPTIONS...] [COMMAND]
Display information about (multiple) commands
whatis [command] [command]
whatis command may be used to provide a brief manual page description of multiple of Linux commands. To do this, just specify a few commands.
Example: Printing brief information about the
Turn off output trimming
whatis -l [command]
To display the output without any trimming, run the whatis command with the
Example: Let’s use the
whatis command with and without this option to see the difference.
Display debugging information
whatis -d [command]
To display debugging information about a Linux command in the terminal, use the
whatis command with the
Example: Displaying debug information about the
Search by Regular Expression
whatis -r [command]
-r option searches for commands by keyword name. If any of the names match any part of the page name, it outputs that match.
Example: Let’s print a short description of the commands that match the
Search commands by pattern
whatis -w [command* or *command]
-w option to search Linux commands using a wild card. Specify a pattern to search for commands matching that pattern.
Example: Let’s find the commands that start with the
cd command pattern.
Using Manual Pages from other OS
whatis -m [system] [command]
-m option provides access to the manual page names of the other systems.
Example: Let’s search for the
cat command from the NewOne system and get a brief description of this command.
Set the Search Path for Manual Pages
whatis -M [system] [command]
To set an alternative search path for manual pages, use the
-M option. By default,
whatis uses the $MANPATH environment variable.
Example: Specifying the default search path for manual pages –manpath=/lib and searching there for the