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.
Syntax:
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:
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
Options:
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 -?
$ whatis –help
Or
2. D, –debug:
Use the” -d” option to get debugging information:
3. -v, verbose:
Use the “-v” option to get verbose detail of a command:
4. –r, regex
Each name is interpreted as a regular expression with this option. When the name matches, the connection will be made:
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:
6. -l, long
This option will not trim output to suit the width of the terminal:
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:
8. -m, –system=SYSTEM
Using the “-m” NewOS option to scan for the names of NewOS’ manual page. NewOS is a Linux operating system.
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:
11. –usage
This option will exit after printing quick usage information:
12. –version
To display the version information, use “–V” with the “whatis” command option:
Conclusion:
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.