- Find Out About Commands with man
- Search for a Command Based on What It Does
- Quickly Find Out What a Command Does Based on Its Name
- Rebuild man's Database of Commands
- Read a Command's Specific Man Page
- Print Man Pages
- Learn About Commands with info
- Navigate Within info
- Locate the Paths for a Command's Executable, Source Files, and Man Pages
- Read Descriptions of Commands
- Find a Command Based on What It Does
- Find Out Which Version of a Command Will Run
- Conclusion
Find a Command Based on What It Does
apropos
The whatis command is similar to man -f, and the apropos command is likewise similar to man -k. Both commands search man pages for the names and descriptions of commands, helping you if you know what a command does but can't remember its name.
Using apropos is easy: Just follow the command with a word or phrase describing the feature of the command in which you're interested.
$ man list No manual entry for list $ man -k list last (1) - show listing of last logged in users ls (1) - list directory contents lshw (1) - list hardware lsof (8) - list open files [Listing condensed due to length] $ apropos list last (1) - show listing of last logged in users ls (1) - list directory contents lshw (1) - list hardware lsof (8) - list open files [Listing condensed due to length]
Just like whatis, you can use the -w (or --wildcard) or the -r (or --regex) options for searches. More interestingly, though, you can use the -e option (or --exact) when you want to tightly focus on a word or phrase, without any exception. For instance, in the previous listing, searching for list turned up the last command because it had the word listing in its description. Let's try that same search, but with the -e option.
$ apropos -e list ls (1) - list directory contents lshw (1) - list hardware lsof (8) - list open files [Listing condensed due to length]
This time, last doesn't show up because you wanted only results with the exact word list, not listing. In fact, the list of results for list went from 80 results without the -e option to 55 results with the -e option, which makes it far easier to precisely target your command searches and find exactly the command you want.