whatis
Overview
The whatis command displays one-line manual page descriptions. It searches the whatis database for complete words and shows brief descriptions of system commands.
Syntax
whatis [options] keyword...Common Options
| Option | Description |
|---|---|
-d |
Debug mode |
-v |
Verbose output |
-r |
Regex search |
-w |
Wildcard search |
-s sections |
Search sections |
-l |
Long output |
-M path |
Set manual path |
-L locale |
Set locale |
--regex |
Use regex |
--wildcard |
Use wildcards |
--long |
Long format |
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
- Quick reference
- Command verification
- Brief descriptions
- Command learning
- Documentation check
Examples with Explanations
Example 1: Basic Usage
whatis lsShow ls command description
Example 2: Multiple Commands
whatis cp mv rmShow multiple descriptions
Example 3: Wildcard Search
whatis -w "lp*"Search with wildcard
Common Usage Patterns
Single command:
whatis commandSection search:
whatis -s 1 commandRegex search:
whatis -r pattern
Search Tips
- Use exact names
- Try wildcards
- Check sections
- Multiple keywords
- Verify results
Additional Resources
Best Practices
- Update database
- Verify commands
- Check sections
- Document findings
- Cross-reference
Output Format
- Command name
- Section number
- Brief description
- Multiple matches
- Error messages
Troubleshooting
- No matches
- Database issues
- Wrong section
- Locale problems
- Path configuration