← Lessons/Reading the Manual (man pages)
← Reading the Manual (man pages)

Find a command by what it does

Learn

Finding a command you don't know the name of

Sometimes the problem is the opposite: you know what you want to do but not which command does it. apropos (equivalently man -k) searches the one-line summaries of every manual on the system for a keyword:

apropos "compress"
# gunzip (1)   - compress or expand files
# gzexe (1)    - compress executable files in place
# gzip (1)     - compress or expand files
# ...

Each result is a command name, its manual section in brackets, and its summary. It's the index at the back of the book: search by topic, get the command names back. Put the phrase in quotes when it's more than one word.

Now the reverse: you don't know a command's name, only that you need to "list directory contents". Search every manual's summary by keyword with apropos (the same as man -k).

sandbox@opspath: ~
OpsPath sandbox · Debian GNU/Linux 12 · GNU bash 5.2
Each command runs in a fresh, isolated sandbox with this lesson's files in ~.
Nothing carries over between commands, so chain with && or | when you need to.
Type a command and press Enter. ↑/↓ history · Ctrl+L clear · Ctrl+C cancel line
# ── Step 3 · Find a command by what it does ──
# Sign in to run commands — it's free.