There’s a specific kind of frustration that comes from knowing exactly what you want a command to do but having no idea what it’s called. You know Linux has a way to check disk partitions, or find files by size, or compress a folder — you just don’t know the exact binary name. That’s the exact gap apropos fills, and it’s one of those commands I wish someone had shown me on day one instead of years in.
What apropos Does
apropos searches the descriptions of every installed manual page — not just the exact command name, but the free-text NAME line — for a given keyword, and returns every match. It’s essentially a keyword search engine over your entire local documentation set, which makes it the natural discovery tool when whatis (exact name lookup only) comes up empty.
I confirmed the distinction directly on my own system:
$ whatis partition
partition: nothing appropriate.
$ apropos partition
proc_partitions (5) - major and minor numbers of partitions
whatis failed because no command is literally named “partition.” apropos succeeded because it searched every man page’s description text and found one mentioning “partitions.”
Basic Syntax
apropos [options] keyword...
A straightforward search:
$ apropos "list directory contents"
dir (1) - list directory contents
ls (1) - list directory contents
vdir (1) - list directory contents
That’s a genuinely useful result — it surfaced three related tools (ls, dir, vdir) that all do essentially the same job, which I might not have thought to check individually.
Prerequisite: The man-db Index Must Exist
Exactly like whatis, apropos depends entirely on the prebuilt index database that mandb generates by scanning every installed man page’s NAME section. If that index is stale or missing (common on minimal cloud/container images), apropos will report nothing found even for common terms. The fix:
$ sudo mandb
I rebuilt the index on a stripped-down test system and immediately went from every query failing to normal results.
Key Options
| Option | Description |
|---|---|
-r | Treat the keyword as a POSIX extended regular expression (this is actually the default matching mode in modern man-db) |
-e | Treat the keyword as an exact string match, not a pattern |
-w | Treat the keyword as a shell-style wildcard pattern |
-a | Require all given keywords to match (logical AND) instead of any one of them |
-l | Do not truncate output to the terminal width |
-s list | Restrict results to specific man sections |
-M path | Use an alternate manual page path |
Regex Search with -r
$ apropos -r "^copy"
This searches for descriptions whose text matches the given regex — anchoring with ^ here restricts to descriptions literally starting with “copy,” filtering out unrelated matches that merely contain “copy” somewhere in the middle of a longer description.
Requiring All Keywords with -a
By default, giving apropos multiple keywords finds pages matching any of them (logical OR). Adding -a switches to requiring all of them (logical AND):
$ apropos -a copy file
This is the difference between “show me anything about copying OR anything about files” (way too broad) and “show me things about copying files specifically” (much more targeted). I use -a constantly once a plain search returns too much noise.
Restricting to a Section
Just like man and whatis, you can scope results to specific man sections:
$ apropos -s 8 network
This restricts results to section 8 (system administration commands), which is exactly the section I care about when I’m specifically hunting for an admin tool rather than a user command or library call with a similar description.
apropos vs. man -k
Identical to the whatis/man -f relationship, man -k is functionally the same operation as apropos:
$ man -k "sort lines"
sort (1) - sort lines of text files
Same result you’d get from apropos "sort lines". I use apropos directly since it’s shorter to type, but you’ll see man -k in older scripts and documentation just as often.
How It Works Internally
apropos performs the same fundamental lookup whatis does — a query against man-db’s prebuilt index database (typically stored under /var/cache/man/) — except where whatis requires an exact match on the page’s name, apropos performs a substring/regex search across the entire NAME description line for every indexed page.
Because it’s a search against a pre-built database rather than scanning files live, apropos returns results in a fraction of a second even across a system with thousands of installed man pages. The tradeoff is the same as whatis‘s: the index has to be current. Any man page installed after the last mandb run simply won’t appear in results until the index is rebuilt, whether by manually running mandb or by the periodic timer job most distros configure to do this automatically (typically man-db.timer under systemd, once a day).
Practical Use Cases
Discovering a tool by what it does, not what it’s called. This is the whole reason apropos exists:
$ apropos "compress files"
Finding every command related to a task before choosing the right one. When I’m about to script something around disk usage, I don’t always remember every relevant tool off the top of my head:
$ apropos "disk usage"
This kind of search regularly surfaces tools I’d forgotten existed, sitting right alongside the obvious ones.
Exploring an unfamiliar system administration domain. New to a particular subsystem (say, LVM, or systemd timers, or SELinux)? A well-chosen keyword search across installed docs is often faster than a web search, and it’s guaranteed to match what’s actually installed and usable on that exact machine:
$ apropos "logical volume"
Cross-referencing config file formats against their managing commands. Since apropos searches across all sections, a single query can surface both a command and its associated file format documentation in one pass — useful for building a mental map of a subsystem quickly.
Interpreting the Output Format
Each result line follows the pattern:
name (section) - description
The section number tells you immediately what kind of documentation you’re looking at (see the man article’s section table for the full breakdown — 1 for user commands, 5 for file formats, 8 for admin tools, etc.), which matters a lot when a search returns multiple entries with the same name across different sections. I always glance at the section number before opening a result, since man name alone opens whichever section comes first in the default search order, which isn’t always the one I actually want.
Troubleshooting
Every search returns “nothing appropriate,” even for common terms: This is almost always a stale or missing index. Run sudo mandb to rebuild it. If mandb itself doesn’t exist, install the man-db package.
Search seems to miss an obviously relevant page: Check whether that specific man page is even installed — apropos can only search what’s indexed, and many minimal system images deliberately strip documentation packages to save space. Confirm with man page_name directly; if that also fails, the documentation isn’t installed at all, not a search problem.
Too many irrelevant results for a common word: Narrow with -a for multi-keyword AND matching, use -s to restrict to a specific section, or switch to -e for an exact substring match instead of pattern-based matching, which can sometimes over-match on short or common terms.
Results seem inconsistent between systems with “the same” software installed: The index is local and built from whatever documentation actually exists on that machine — different distros, different package selections, and different levels of stripped-down minimization will all produce different apropos coverage even for identical software versions.
whatis vs. apropos — When to Use Which
| Situation | Use |
|---|---|
| You know the exact command name and want its one-line summary | whatis |
| You know roughly what you want to do but not the command name | apropos |
| You want to disambiguate between multiple man sections for one name | Either, combined with -s |
| You want to discover related/alternative tools for a task | apropos |
In practice I treat apropos as the discovery tool and whatis as the confirmation tool — search broadly with apropos, then once I’ve identified the right command name, whatis (or straight into man) for the details.
Security and Auditing Notes
On systems I’m reviewing for the first time — inherited servers, machines I’m auditing for a security assessment — I sometimes run broad apropos searches for terms like “password,” “encrypt,” “firewall,” or “capabilities” just to get a quick inventory of what security-relevant tooling is actually installed and documented on that box, before diving into a more thorough audit. It’s not a substitute for a real security review, but as a fast first-pass discovery step it’s genuinely useful, and it costs nothing since it only reads local documentation.
Combining apropos with Other Tools
apropos output is plain text, which means it composes naturally with the rest of the standard toolset once you need to do something more than eyeball the results.
Piping into grep for a second layer of filtering when apropos‘s own -a flag isn’t quite precise enough:
$ apropos network | grep -i "wireless"
Counting how many tools relate to a given topic, which is a quick way to gauge how much tooling exists around a subsystem before diving in:
$ apropos -s 8 network | wc -l
Extracting just the command names for scripting purposes, stripping the section number and description down to something you can feed into a loop:
$ apropos -s 1 "compress" | awk '{print $1}'
I’ve used this last pattern to build small interactive menus — presenting a filtered list of relevant commands and letting a script prompt for which one to actually run or document further, rather than hardcoding a static list that goes stale as tools are added or removed from a system over time.
Building a Personal Reference from apropos Output
When I’m learning a new area of Linux administration — say, getting properly comfortable with LVM after mostly avoiding it — I’ll run a handful of broad apropos searches early and save the combined output as a starting reference document:
$ { apropos "logical volume"; apropos -s 8 lvm; } > lvm-reference.txt
This produces a locally-accurate list of exactly what’s installed and documented on that specific machine, which I find more trustworthy as a starting point than a generic web tutorial that might describe a different distribution’s tool versions or defaults. From there, man on each individual result fills in the actual depth.
apropos and the Wider man-db Ecosystem
It’s worth understanding that apropos, whatis, and man -k/man -f are not three independently implemented features — they’re different entry points into the same underlying man-db package and the same prebuilt index file. This matters practically in two ways. First, anything that fixes one (like rebuilding the index with mandb) fixes all of them simultaneously, since they share the same data source. Second, understanding this relationship helps explain otherwise-confusing behavior — if apropos and man -k ever appear to return slightly different results for what looks like an identical query, it’s worth double-checking the exact flags each was called with, since subtle differences in default matching behavior (verbatim substring vs. regex vs. wildcard) can produce different result sets even when the underlying data queried is identical.
When apropos Isn’t the Right Tool
It’s worth being honest about the limits here. apropos only searches locally installed documentation — it has no awareness of software that isn’t installed, no matter how well-known or commonly used that software might be elsewhere. If you’re trying to discover what package might solve a problem before installing anything, apropos won’t help; that’s a job for your package manager’s own search functionality instead (apt search, dnf search, and so on), which searches the full remote repository catalog rather than just what’s already on disk. I treat the two as sequential steps for genuinely unfamiliar territory: apt search first to find and install something plausible, then apropos/man afterward once it’s actually on the system and documented locally.
Best Practices
- Keep the man-db index fresh —
sudo mandbafter significant software installs, especially anything built from source with manually placed man pages. - Reach for
-aearly once single-keyword searches get noisy; it’s the fastest way to sharpen results without switching tools. - Combine with
-swhen you specifically need commands (section 1/8) rather than file formats (section 5) or library calls (section 2/3). - Treat
aproposas your default starting point when you’re not 100% sure of a command’s exact name — it’s faster than guessing at names or searching the web for something that might already be sitting on your own filesystem.
Compatibility Across Distributions
apropos is part of the man-db package, standard across essentially every mainstream Linux distribution — Debian, Ubuntu, Fedora, RHEL/CentOS/Rocky/Alma, Arch, openSUSE. Behavior is consistent across all of them since they share the same upstream project. As with whatis and man, the meaningful variable across systems isn’t the tool’s behavior but whether documentation packages are actually installed — minimal cloud and container images frequently exclude man pages by default, which will make apropos return nothing useful until documentation packages are explicitly installed and mandb is run.
Summary
apropos searches the description text of every installed manual page for a keyword, making it the natural discovery tool when you know what you want to accomplish but not the exact command name. It relies on the same prebuilt man-db index that powers whatis, so keeping that index current with mandb is essential for reliable results. Combined with section restriction (-s) and AND-matching (-a) for narrowing broad searches, it’s one of the fastest ways to explore what’s actually available and documented on a given Linux system — often faster than a web search, and guaranteed to reflect what’s genuinely installed.
References
man aproposandman man-db— official man-db documentation- man-db project — https://gitlab.com/man-db/man-db
- Debian man-db package page — https://packages.debian.org/man-db