apropos
Overview
The apropos command searches the manual page names and descriptions for a specified keyword. It’s useful for finding commands when you don’t know their exact names.
Syntax
apropos [options] keyword...Common Options
| Option | Description |
|---|---|
-a |
Match all keywords |
-e |
Use exact match |
-r |
Use regex pattern |
-s sections |
Search sections |
-l |
Long output format |
-w |
Show page locations |
-C |
Case sensitive |
-L locale |
Set locale |
-M path |
Set manual path |
-S |
Sort output |
-v |
Verbose output |
Manual Sections
| Section | Content |
|---|---|
| 1 | User commands |
| 2 | System calls |
| 3 | Library functions |
| 4 | Special files |
| 5 | File formats |
| 6 | Games |
| 7 | Miscellaneous |
| 8 | System administration |
| 9 | Kernel routines |
Key Use Cases
- Command discovery
- Function lookup
- Documentation search
- Topic exploration
- Learning tools
Examples with Explanations
Example 1: Basic Search
apropos directoryFind directory-related commands
Example 2: Multiple Keywords
apropos -a search fileMatch all keywords
Example 3: Exact Match
apropos -e chmodExact command match
Common Usage Patterns
General search:
apropos keywordSection search:
apropos -s 1 keywordRegex search:
apropos -r 'pattern'
Search Tips
- Use keywords
- Try synonyms
- Check sections
- Use regex
- Combine terms
Additional Resources
Best Practices
- Be specific
- Use options
- Check all results
- Verify matches
- Document findings
Output Format
- Command name
- Section number
- Description
- Manual path
- Match context
Troubleshooting
- No matches
- Too many results
- Wrong section
- Database issues
- Locale problems