apropos
Overview
The apropos
command searches the manual page names and descriptions for a keyword or regular expression. 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 |
-r |
Use regex for matching |
-s sections |
Search specific manual sections |
-l |
List format output |
-w |
Match whole words only |
-e |
Use exact match |
--and |
Match all keywords (AND search) |
--or |
Match any keyword (OR search) |
Key Use Cases
- Find relevant commands
- Discover command alternatives
- Search command descriptions
- Learn about system features
- Command exploration
Examples with Explanations
Example 1: Basic Search
apropos password
Find commands related to passwords
Example 2: Multiple Keywords
apropos -a user password
Find commands related to both user and password
Example 3: Regex Search
apropos -r '^zip.*'
Find commands starting with ‘zip’
Understanding Output
Format:
command (section) - description
Example:
passwd (1) - change user password
Common Usage Patterns
Find command by function:
apropos "change password"
Search specific section:
apropos -s 1 editor
Exact match:
apropos -e command
Performance Analysis
- Database-driven searches
- Regular expression support
- Section-specific searches
- Boolean operations
- Multiple keyword search