Whatis command in Linux

37

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

Whatis command in Linux 1619309412 356 Whatis command in Linux

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 -?
$ whatishelp

Or

Whatis command in Linux 1619309413 373 Whatis command in Linux

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

Whatis command in Linux 1619309414 82 Whatis command in Linux

Whatis command in Linux 1619309414 953 Whatis command in Linux

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

Whatis command in Linux 1619309415 658 Whatis command in Linux

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

Whatis command in Linux 1619309415 411 Whatis command in Linux

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 command in Linux 1619309415 262 Whatis command in Linux

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

Whatis command in Linux 1619309416 90 Whatis command in Linux

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 command in Linux 1619309416 346 Whatis command in Linux

Whatis command in Linux 1619309417 925 Whatis command in Linux

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 command in Linux 1619309417 127 Whatis command in Linux

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

Whatis command in Linux 1619309417 456 Whatis command in Linux

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

Whatis command in Linux 1619309418 195 Whatis command in Linux

11. –usage

This option will exit after printing quick usage information:

Whatis command in Linux 1619309418 631 Whatis command in Linux

12. –version

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

Whatis command in Linux 1619309419 752 Whatis command in Linux

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.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More