As you explore the Linux command line, you'll encounter a vast number of commands. It's natural to forget what a specific command does. Fortunately, there's a simple utility to help you out.
What is the whatis Command in Linux
The whatis command in Linux displays a concise, one-line description of a command directly from its manual (man) page. It's a quick way to get a reminder of a command's primary function without reading the entire man page. Think of the linux whatis command as a quick dictionary for your terminal.
How to Use the whatis Command
Using the whatis command linux is straightforward. Simply type whatis followed by the name of the command you want to know about. For example, if you're unsure about the cat command, you can run:
whatis cat
This will return a short description, such as "cat - concatenate files and print on the standard output".
Understanding the Output
The description provided by the linux whatis command is sourced directly from the NAME section of the command's manual page. This ensures the information is accurate and consistent with the system's documentation. If a command has multiple manual pages in different sections, whatis may display a line for each, helping you understand its various contexts.