Linux CLI 9 🐧 whatis,apropos and info commands
These three commands help you discover and explore commands on your system. They’re complementary tools for finding the right command and learning more about it.
Overview
| Command | Purpose | Best For |
|---|---|---|
whatis | One-line description of a command | Quick lookup when you know the name |
apropos | Search by keyword | Finding a command when you don’t know its name |
info | Detailed hyperlinked documentation | In-depth learning about a command |
The whatis Command
Displays a brief one-line description of a command.
whatis ls
whatis cp mv
whatis -w 'mv*'
whatis -r 'mv[ab]+'
sudo makewhatis
| Command | Description |
|---|---|
whatis ls | Show one-line description of ls |
whatis cp mv | Show descriptions for multiple commands |
whatis -w 'mv*' | Wildcard search |
whatis -r 'mv[ab]+' | Regex search |
whatis -s | Case-sensitive search |
sudo makewhatis | Update the whatis database |
Examples
$ whatis ls
ls (1) - list directory contents
$ whatis cp mv
cp (1) - copy files and directories
mv (1) - move (rename) files
$ whatis mkdir rmdir
mkdir (1) - make directories
rmdir (1) - remove empty directories
$ whatis cat
cat (1) - concatenate files and print on the standard output
Multiple sections for the same name:
$ whatis mkdir
mkdir (1) - make directories
mkdir (2) - create a directory
Wildcard search (-w):
$ whatis -w 'mv*'
mv (1) - move (rename) files
mvfn (1) - move files with find integration
Regex search (-r):
$ whatis -r 'mv[ab]+'
mv (1) - move (rename) files
Case-sensitive search (-s):
$ whatis -s LS
LS: nothing appropriate.
$ whatis -s ls
ls (1) - list directory contents
Updating the whatis Database
If you’ve installed new commands and whatis doesn’t find them, update the database:
$ sudo makewhatis
Why? whatis searches a pre-built database of man page descriptions — not the man pages themselves. New installations may not be indexed yet.
Equivalent commands:
sudo mandb # Common on Debian/Ubuntu
sudo makewhatis # Common on Red Hat/CentOS
When to use it:
- After installing software from source
- After installing new man pages
- When
whatisreturns “nothing appropriate” for a command that exists
The apropos Command
Searches the manual pages for a keyword — finds commands when you don’t know their names.
apropos directory
apropos "remove file"
apropos -w 'mv*'
apropos -r 'mv[ab]+'
apropos -a remove directory
apropos -s 1,2 directory
| Command | Description |
|---|---|
apropos directory | Search for “directory” |
apropos "remove file" | Search for multiple keywords |
apropos -w 'mv*' | Wildcard search |
apropos -r 'mv[ab]+' | Regex search |
apropos -a remove directory | Must include all keywords |
apropos -s 1,2 directory | Search in specific sections |
Examples
Single keyword:
$ apropos directory
basename (1) - strip directory and suffix from filenames
chdir (2) - change working directory
dirname (1) - strip last component from file name
mkdir (1) - make directories
mkdir (2) - create a directory
pwd (1) - print name of current/working directory
rmdir (1) - remove empty directories
...
Multiple keywords (default OR):
$ apropos "remove file"
# Finds commands related to removing files
rm (1) - remove files or directories
unlink (1) - call the unlink function to remove the specified file
...
Note: By default, apropos treats space-separated words as alternatives (OR) — it matches commands whose description contains any of the keywords.
All keywords required (-a):
$ apropos -a remove directory
rmdir (1) - remove empty directories
# Only matches descriptions containing BOTH "remove" AND "directory"
Wildcard search (-w):
$ apropos -w 'mv*'
mv (1) - move (rename) files
mvn (1) - Maven - Project Object Model
...
Regex search (-r):
$ apropos -r 'mv[ab]+'
mv (1) - move (rename) files
Search specific sections (-s):
$ apropos -s 1,2 directory
mkdir (1) - make directories
mkdir (2) - create a directory
chdir (2) - change working directory
pwd (1) - print name of current/working directory
...
Sections: 1 = user commands, 2 = system calls, 3 = library functions, etc.
Practical Use: Finding the Right Command
You want to rename multiple files but don’t know the command:
$ apropos rename
rename (1) - rename files
rename (2) - change the name or location of a file
mv (1) - move (rename) files
...
You want to search inside files but don’t remember grep:
$ apropos "search text"
grep (1) - print lines that match patterns
rgrep (1) - print lines that match patterns
...
You want to compress files but don’t know the tools:
$ apropos compress
bzip2 (1) - a block-sorting file compressor
gzip (1) - compress or expand files
tar (1) - an archiving utility
xz (1) - compress or decompress .xz and .lzma files
zip (1) - package and compress (archive) files
...
The info Command
Provides more detailed, hyperlinked documentation than man pages.
info cp
info -k "copy"
info -f /path/to/file.info
| Command | Description |
|---|---|
info cp | Show info page for cp |
info -k "copy" | Search for a keyword in all info files |
info -f file | Use a specific info file |
Examples
Basic info:
$ info cp
# Displays a hyperlinked manual for cp
Search info files:
$ info -k "copy"
"copy" has the following matches:
- cp
- cpio
- dd
- install
- ...
Use a specific info file:
$ info -f /usr/share/info/coreutils.info
Info Navigation Shortcuts
The info command uses its own pager with hyperlinked navigation:
| Key | Action |
|---|---|
Space | Scroll ahead |
Backspace | Scroll back |
n | Next node |
p | Previous node |
u | Go one level up |
Enter | Follow a link |
l | Go back in history |
r | Go forward in history |
q | Quit info |
Info page structure:
File: coreutils.info, Node: cp invocation, Next: dd invocation, Prev: cat invocation, Up: Basic operations
'cp': Copy files and directories
================================
'cp' copies files...
- File — which info file you’re in
- Node — the current section
- Next / Prev — sibling nodes
- Up — the parent node
Man vs Info
| Aspect | man | info |
|---|---|---|
| Format | Plain text | Hyperlinked |
| Navigation | Linear (scroll) | Tree (nodes) |
| Depth | Moderate | Deep |
| Structure | Single page | Multiple nodes |
| Best for | Quick reference | In-depth learning |
| Coverage | Everything | GNU tools mainly |
Key insight: For GNU tools (like cp, ls, bash), info often has more information than man. For other tools, man may be the only option.
Complete Example Session
# ============================================
# PART 1: WHATIS — QUICK DESCRIPTIONS
# ============================================
# Single command
$ whatis ls
ls (1) - list directory contents
# Multiple commands
$ whatis cp mv mkdir
cp (1) - copy files and directories
mv (1) - move (rename) files
mkdir (1) - make directories
# Multiple sections for same name
$ whatis mkdir
mkdir (1) - make directories
mkdir (2) - create a directory
# Wildcard
$ whatis -w 'm*'
mkdir (1) - make directories
mkdir (2) - create a directory
mknod (1) - make block or character special files
mknod (2) - create a special or ordinary file
more (1) - file perusal filter for crt viewing
mount (8) - mount a filesystem
mv (1) - move (rename) files
# Update database
$ sudo makewhatis
# (no output — updates the database silently)
# ============================================
# PART 2: APROPOS — SEARCH BY KEYWORD
# ============================================
# Single keyword
$ apropos directory
basename (1) - strip directory and suffix from filenames
dirname (1) - strip last component from file name
mkdir (1) - make directories
pwd (1) - print name of current/working directory
rmdir (1) - remove empty directories
# Multiple keywords (OR by default)
$ apropos "remove file"
rm (1) - remove files or directories
unlink (1) - call the unlink function to remove the specified file
# All keywords required (-a)
$ apropos -a remove directory
rmdir (1) - remove empty directories
# Wildcards
$ apropos -w 'mv*'
mv (1) - move (rename) files
mvn (1) - Maven - Project Object Model
# Regex
$ apropos -r 'mv[ab]+'
mv (1) - move (rename) files
# Specific sections
$ apropos -s 1,2 directory
chdir (2) - change working directory
mkdir (1) - make directories
mkdir (2) - create a directory
pwd (1) - print name of current/working directory
# Practical: find a compression tool
$ apropos compress
bzip2 (1) - a block-sorting file compressor
gzip (1) - compress or expand files
tar (1) - an archiving utility
xz (1) - compress or decompress .xz and .lzma files
zip (1) - package and compress (archive) files
# ============================================
# PART 3: INFO — DETAILED DOCUMENTATION
# ============================================
$ info cp
# Shows hyperlinked manual for cp
# Search info pages
$ info -k "copy"
"copy" has the following matches:
- cp
- cpio
- dd
- install
- ...
# Using specific info file
$ info -f /usr/share/info/coreutils.info
# Navigation (in info)
# Press Space → scroll ahead
# Press n → next node
# Press p → previous node
# Press u → go up
# Press Enter → follow link
# Press q → quit
Quick Reference
whatis Options
| Option | Description |
|---|---|
| (none) | Show description for a command |
-w | Wildcard search |
-r | Regex search |
-s | Case-sensitive search |
makewhatis | Update the database (with sudo) |
apropos Options
| Option | Description |
|---|---|
| (none) | Search by keyword |
-a | Require all keywords |
-w | Wildcard search |
-r | Regex search |
-s N | Search in specific sections |
info Options
| Option | Description |
|---|---|
| (none) | Show info page for a command |
-k keyword | Search all info files |
-f file | Use specific info file |
info Navigation
| Key | Action |
|---|---|
Space | Scroll ahead |
Backspace | Scroll back |
n | Next node |
p | Previous node |
u | Up one level |
Enter | Follow link |
q | Quit |
When to Use Which
| Situation | Use |
|---|---|
| Know the name, want a quick description | whatis cmd |
| Don’t know the name, want to find it | apropos keyword |
| Want to search by keyword | apropos -a word1 word2 |
| Want detailed docs on a GNU tool | info cmd |
| Want to search all docs for a phrase | info -k "phrase" |
| Multiple commands’ descriptions at once | whatis cmd1 cmd2 cmd3 |
Best Practices
✅ Do This:
# Quick lookup when you know the name
whatis gzip
# Find commands by keyword
apropos "compress"
# Require multiple keywords
apropos -a "remove" "directory"
# Search specific section
apropos -s 1 "network"
# Get detailed docs
info coreutils
# Update whatis database after installs
sudo makewhatis
# Search info by keyword
info -k "extract"
❌ Don’t Do This:
# Don't forget to update whatis database
whatis mynewcmd # ⚠️ "nothing appropriate"
sudo makewhatis # ✅ Update first
# Don't rely on apropos with common words
apropos "file" # ⚠️ Returns hundreds of results
apropos -a "remove" "directory" # ✅ Narrow search
# Don't forget info uses its own navigation
info ls
# Use Space, n, p, u, q — not arrow keys!
# Don't confuse sections in man vs info
man 2 mkdir # ✅ Man section 2
info mkdir # ✅ Info page (no sections)
Common Pitfalls
| Pitfall | Problem | Solution |
|---|---|---|
whatis finds nothing | Database not updated | Run sudo makewhatis |
apropos too many results | Common keyword | Use -a for all keywords |
Can’t navigate info | Wrong keys | Use Space, n, p, u, q |
Confusing man and info | Different navigation | Remember: man is linear, info is hyperlinked |
Wrong section for whatis | Multiple entries | Use section number: man 2 mkdir |
Visual: Choosing the Right Tool
┌──────────────────────────────────────────┐
│ What do you want to do? │
└──────────────────┬───────────────────────┘
│
┌──────────┴──────────┐
│ │
Know the name? Don't know the name?
│ │
▼ ▼
┌──────────┐ ┌──────────────┐
│ whatis │ │ apropos │
│ cmd │ │ keyword │
└────┬─────┘ └──────┬───────┘
│ │
└───────────┬───────────┘
│
│ Need more detail?
▼
┌──────────┐
│ info │
│ cmd │
└──────────┘
Real-World Examples
1. Discovering Compression Tools
$ apropos compress
bzip2 (1) - a block-sorting file compressor
gzip (1) - compress or expand files
pigz (1) - parallel implementation of gzip
tar (1) - an archiving utility
xz (1) - compress or decompress .xz and .lzma files
zip (1) - package and compress (archive) files
2. Getting Details on a Known Command
$ whatis tar
tar (1) - an archiving utility
$ info tar
# Opens the detailed info page
3. Finding All File-Removal Commands
$ apropos -a remove file
rm (1) - remove files or directories
unlink (1) - call the unlink function to remove the specified file
4. Updating the Database
# After installing a new tool
$ sudo apt install mytool
$ whatis mytool
mytool: nothing appropriate.
$ sudo makewhatis
$ whatis mytool
mytool (1) - a great new tool
5. Detailed Information on Bash
$ info bash
# Opens the complete Bash manual
# Navigate with n, p, u, Space, Enter, q
Summary
| Command | Purpose | Example |
|---|---|---|
whatis | One-line description | whatis ls |
apropos | Search by keyword | apropos "remove file" |
info | Detailed hyperlinked docs | info cp |
Key takeaways:
whatis— quick lookup when you know the name —whatis cmdapropos— search by keyword when you don’t know the name —apropos keywordinfo— the deepest documentation, especially for GNU tools —info cmdsudo makewhatis— update thewhatis/aproposdatabase after installing softwareapropos -a— require all keywords (narrows results)apropos -s N— restrict to specific manual sectionsinfo -k— search all info files for a keywordinfonavigation — uses nodes and links:n(next),p(prev),u(up),Enter(follow),q(quit)
Remember: These three commands form your discovery toolkit. When you know a command’s name, use whatis for a quick description. When you don’t, use apropos to search by keyword. And when you want the deepest documentation, use info — especially for GNU tools, where info often has content that man doesn’t!
Stop using slow, ad-bloated tool sites! 🤮
🔎 Search “KandZ Tools” on Google to use many professional utilities for free.
KandZ.me is the ultimate minimalist hub for:
✅ Finance (Mortgage, Interest, Inflation)
✅ Tech (Base64, JSON, Dev Suite, IP)
✅ Health (BMI, BMR, TDEE)
✅ Productivity (Timer, Workspace, QR)
⚡️ Fast & Private
🔒 No data leaves your device
💎 100% Free
🔗 Use it now: https://tools.kandz.me
🔖 Bookmark it—you’ll need it later!