
Apropos, Info and Whatis Commands
Think of these commands as your Linux documentation toolkit. When you're not sure which command to use, or need to understand what a command does, these tools help you find the right information quickly.
Quick Reference
Command | Description | Common Use |
---|---|---|
apropos |
Search for commands by description | When you know what you want to do but not the command name |
info |
View detailed documentation | When you need comprehensive information about a command |
whatis |
Show one-line descriptions | When you need a quick summary of what a command does |
apropos Command
The apropos
command is like a search engine for Linux commands. It helps you find commands when you know what you want to do but can't remember the exact command name.
When to Use apropos
Use apropos
when you want to:
- Find commands related to a specific task
- Discover new commands you didn't know about
- See all commands that deal with a particular topic
- Get a quick overview of available tools
Common Options
Option | What It Does | When to Use It |
---|---|---|
-a |
Match all keywords | When you want to narrow down results |
-e |
Exact word matching | When you want precise results |
-s |
Search specific sections | When you want to focus on certain types of commands |
-w |
Match whole words | When you want to avoid partial matches |
Practical Examples
Basic Search
# Find commands related to copying
apropos copy
# Find commands about files
apropos file
# Find commands about networking
apropos network
Advanced Search
# Find commands that match both 'file' and 'copy'
apropos -a file copy
# Search only in section 1 (user commands)
apropos -s 1 copy
# Find exact matches for 'copy'
apropos -e copy
info Command
The info
command is like an interactive textbook for Linux commands. It provides detailed documentation that's often more comprehensive than man pages, with a structure similar to a website.
When to Use info
Use info
when you want to:
- Get detailed documentation about a command
- Learn about command features in depth
- Navigate through related topics easily
- Access comprehensive tutorials
Common Options
Option | What It Does | When to Use It |
---|---|---|
--apropos |
Search all info pages | When you want to find information across all docs |
--directory |
Add custom info directory | When you have additional documentation |
--output |
Save to file | When you want to read documentation later |
Navigation Tips
Key | What It Does | When to Use It |
---|---|---|
h |
Show help | When you need to see all navigation options |
Space |
Next page | When reading through documentation |
Backspace |
Previous page | When you want to go back |
n |
Next node | When moving to the next section |
p |
Previous node | When returning to previous section |
u |
Up one level | When you want to go back to the main menu |
m |
Open menu | When you want to jump to a specific section |
q |
Quit | When you're done reading |
Practical Examples
Basic Usage
# View info for bash
info bash
# Search all info pages
info --apropos "regular expression"
# Save info to a file
info bash --output=bash-info.txt
whatis Command
The whatis
command is like a quick dictionary for Linux commands. It gives you a one-line description of what a command does, perfect for when you need a quick reminder.
When to Use whatis
Use whatis
when you want to:
- Get a quick summary of a command
- Check what a command does
- Verify you're using the right command
- Get a brief reminder of command purpose
Common Options
Option | What It Does | When to Use It |
---|---|---|
-w |
Match whole words | When you want precise matches |
-r |
Use regular expressions | When you want flexible matching |
-s |
Search specific sections | When you want to focus on certain types of commands |
Practical Examples
Basic Usage
# Get description of ls
whatis ls
# Search for commands about files
whatis -r "file.*"
# Check commands in section 1
whatis -s 1 ls
Tips for Success
- Start with whatis: Get a quick overview before diving into details
- Use apropos for discovery: Great for finding new commands
- Use info for learning: Best for comprehensive documentation
- Learn the navigation: Practice using info navigation keys
Common Mistakes to Avoid
- Using apropos with too general terms
- Not using -w when you want exact matches
- Forgetting to use q to quit info
- Not checking multiple sections when needed
Best Practices
- Use whatis for quick checks
- Use apropos to discover new commands
- Use info for in-depth learning
- Combine these commands with man for complete understanding