You will never remember every option of every Linux command, and that is normal. The real skill of a system administrator is not to know everything by heart, but to find the information in seconds without leaving the terminal. This guide shows you the help tools of Linux that make this possible: --help, man, apropos, whatis, info and tldr.
What you will learn
- Display the quick help of a command with
--help - Read the full documentation with
man - Navigate a man page (search, move forward, quit)
- Find a command by keyword with
aproposandwhatis - Choose the right help tool for the situation
Installing the help tools
On a minimal installation, do not assume what is there, because it
varies from one distribution to another. On a minimal AlmaLinux 10, man,
apropos and whatis are present, with their 3,100 manual pages, but
info is missing and the man-pages package is not installed. On a
"minimized" Ubuntu, it is the other way round: /usr/bin/man is only a small
script inviting you to run unminimize.
The reflex that settles it, before installing anything:
command -v man apropos whatis infoFor each name, command -v prints the path of the command if it exists, and
prints nothing if it is missing. The tools that do not appear in the
output are installed with the packages below.
sudo apt install man-db manpages manpages-dev info pipxsudo mandbpipx install tldrpipx (in French) installs
Python programs each in its own isolated environment and puts their launcher in
~/.local/bin, a folder that is not yet in the PATH (the list of folders
where the shell looks for commands) on a fresh installation. After
pipx install tldr, the tldr command therefore stays unfound until you have
run pipx ensurepath, then opened a new session (or reloaded ~/.bashrc with source ~/.bashrc):
pipx ensurepathIn the new session, download the sheets, then check:
tldr --updatetldr --versionsudo dnf install man-db man-pages infosudo mandbpipx is not in the base repositories of AlmaLinux, Rocky and RHEL 10:
it comes from the EPEL community repository (Extra Packages for Enterprise
Linux), which you have to enable first. On Fedora, EPEL is unnecessary, pipx
is already available.
On AlmaLinux 10 and Rocky 10, the epel-release package is in the
distribution repositories. The following sequence was tested on AlmaLinux
10.2: pipx 1.18.12 installs from EPEL, then pipx install tldr puts tldr
3.4.4 in place. Installing epel-release also advises enabling the CRB
(CodeReady Builder) repository, but pipx installed without that step, because
the crb repository was already listed in dnf repolist on AlmaLinux.
sudo dnf install epel-releasesudo dnf install pipxpipx install tldrpipx ensurepathOn RHEL 10, epel-release is not in the repositories: dnf install epel-release answers No match for argument (tested on the RHEL 10.3 UBI
image). The official procedure of the
EPEL documentation
first enables the CodeReady Builder repository with your subscription, then
installs the package from the project website. This procedure comes from the
EPEL documentation, with no test on a registered RHEL:
sudo subscription-manager repos --enable codeready-builder-for-rhel-10-$(arch)-rpmssudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpmsudo dnf install pipxpipx install tldrpipx ensurepathIf tldr stays unfound, open a new session. Then run tldr --update and
tldr --version.
The packages in detail:
| Package | Provides | Why it is needed |
|---|---|---|
man-db | man, apropos, whatis | It is the documentation engine: without it, no man page can be read |
manpages / man-pages | The generic pages (system calls, C functions, conventions) | Without it, sections 2, 3 and 7 are empty; the pages shipped by each package stay |
info | info | Extended GNU documentation (optional) |
pipx | pipx | Install Python tools in isolation |
tldr (via pipx) | tldr | Community cheat sheets of practical examples (optional) |
The sudo mandb command builds the index used by apropos and whatis. Without that step, those commands always return nothing appropriate.
Quick help: --help
It is the simplest reflex. Almost every Linux command accepts the --help option:
ls --helpYou get a summary of the syntax, of the main options and sometimes examples. The output usually fits on one screen.
cp --helpmkdir --helpThe right moment for --help is when you already know the command and only look for the name of an option: the answer fits on one screen, where the full man page asks you to navigate.
Some commands use -h instead of --help (or as well). If --help does not work, try -h.
Full documentation: man
man (manual) is the documentation system built into Linux. Most commands, configuration files and system functions have a man page.
man lsYou enter an interactive viewer (the less pager). Here are the essential keys:
| Key | Action |
|---|---|
| Space | Move forward one page |
| b | Move back one page |
| / then a word | Search the page |
| n | Next search result |
| N | Previous result |
| q | Quit |
Structure of a man page
Man pages follow a standard layout. Knowing these sections lets you find the information without reading everything:
| Section | Content | What you look for there |
|---|---|---|
| NAME | Name and short description | Check that it is the right command |
| SYNOPSIS | Usage syntax | See the expected options and arguments |
| DESCRIPTION | Detailed explanation | Understand what the command does |
| OPTIONS | Full list of options | Find the option you need |
| EXAMPLES | Usage examples | Copy an example and adapt it |
| FILES | Related configuration files | Find where to change the behavior |
| SEE ALSO | Related commands and pages | Discover complementary commands |
| EXIT STATUS | Exit codes | Understand errors in a script |
When you are in a hurry, the pager search is the shortcut: type /EXAMPLES in the man page then Enter, and you jump straight to the examples, without reading the previous sections. Not every page has this section: those of ls and cp do not (GNU coreutils 9.7, tested on Debian 13), and the search then answers Pattern not found. In that case, tldr (further down) gives examples.
Shell builtins: help and type
Some commands are not programs but shell builtins. cd is one: man cd answers No manual entry for cd. Their help is read with help, and type tells you what kind of command you are dealing with:
type cdhelp cdcd is a shell builtincd: cd [-L|[-P [-e]] [-@]] [dir] Change the shell working directory.The first line comes from type, the following ones from the start of help cd. If type answers cd is a shell builtin, look it up with help, not with man. The same reflex applies to echo, pwd or export.
The manual sections
The manual is organized in numbered sections. Some commands exist in several sections:
| Section | Content |
|---|---|
| 1 | User commands |
| 2 | System calls (kernel functions) |
| 3 | Library functions (C) |
| 5 | File formats and conventions |
| 7 | Conventions and miscellaneous topics |
| 8 | System administration commands |
To read a specific section:
man 5 passwd # the format of the /etc/passwd fileman 1 passwd # the passwd commandWithout a number, man shows the first section it finds.
Finding a command: apropos and whatis
These two commands query an index of the manual pages, not the pages themselves. On a fresh installation that index may be missing: sudo mandb builds it.
apropos: "I do not know the command"
You know what you want to do, but not which command does it. apropos searches the descriptions of all man pages:
apropos "copy files"apropos copyapropos looks for the words you type in the descriptions, nothing more. On Debian 13, the phrase "copy files" returns only two commands:
cp (1) - copy files and directoriesinstall (1) - copy files and set attributesWith the single word copy, the list gets longer and also contains rsync and scp, whose descriptions do not contain the phrase "copy files":
cp (1) - copy files and directoriesrsync (1) - a fast, versatile, local/remote file-copying toolscp (1) - OpenSSH secure file copyA short word finds more pages than an exact phrase: start broad, then add words to narrow down. The section "Why space usage and not disk usage", further down, explains why.
whatis: "I know the command, what is it in one line?"
whatis prints the short description (NAME section) of a command:
whatis ls cp mkdir rmls (1) - list directory contentscp (1) - copy files and directoriesmkdir (1) - make directoriesrm (1) - remove files or directoriesinfo: extended documentation (GNU)
Some GNU tools (coreutils, grep, sed, awk) offer info pages that are more detailed than their man pages, with extra examples:
info coreutilsinfo grepNavigation is different: Enter follows a link, u goes up, q quits. In practice, man pages are enough for most questions.
tldr: concrete examples, right away
Man pages are complete but sometimes intimidating for a beginner. tldr (Too Long; Didn't Read) offers community cheat sheets of practical examples, right in the terminal:
tldr tar tar Archiving utility. Often combined with a compression method, such as `gzip` or `bzip2`. More information: https://www.gnu.org/software/tar/manual/tar.html. - [c]reate an archive and write it to a [f]ile: tar cf path/to/target.tar path/to/file1 path/to/file2 ... - [c]reate a g[z]ipped archive and write it to a [f]ile: tar czf path/to/target.tar.gz path/to/file1 path/to/file2 ... - E[x]tract a (compressed) archive [f]ile into the current directory [v]erbosely: tar xvf path/to/source.tar.extIn each example, the letters in square brackets recall the matching option ([c]reate for c, [f]ile for f), and path/to/... is replaced by your own paths.
Each sheet shows the most frequent use cases with commands ready to copy. The number of examples depends on the sheet published by the project, not on the client version: the excerpt above only shows the first ones.
Offline documentation: /usr/share/doc
Installed packages sometimes drop documentation into /usr/share/doc/:
ls /usr/share/doc/openssh-server/You will find README files, a CHANGELOG, configuration examples. It helps when the man page does not cover a specific case.
Which tool should you use?
The right reflex depends on what you already know. Read the Situation column first: if you know the name of the command, --help then man are enough; if you do not, apropos searches the descriptions of every installed page. The difference matters, because man asks for the name of the command: it does not help you find it.
| Situation | Tool | Example |
|---|---|---|
| I know the command, I look for an option | --help | tar --help |
| I need the full reference of a known command | man | man tar |
| I do not know which command does the job | apropos | apropos archive |
| I want concrete examples quickly | tldr | tldr tar |
| I look for detailed examples (GNU) | info | info tar |
| I look for a configuration file | man 5 | man 5 fstab |
Practical exercise
-
Show the quick help of
ls:Terminal window ls --helpSpot the option that shows sizes in a readable format (KB, MB).
-
Open the man page of
cp:Terminal window man cpSearch
/recursiveto find the option that copies directories. Quit with q. -
Look for a command that shows disk space:
Terminal window apropos "space usage"On Debian 13, you find
dfanddu:df (1) - report file system space usagedu (1) - estimate file space usage -
Check with
whatis:Terminal window whatis df du
Why "space usage" and not "disk usage"
The phrase that comes naturally to mind, apropos "disk usage", returns
neither df nor du. It is not a bug: apropos looks for the words you
type in the actual descriptions of the pages, and the coreutils ones say
report file system space usage and estimate file space usage. The word
"disk" appears nowhere.
Depending on what is installed on the machine, you get either
disk usage: nothing appropriate. (exit code 16), or, more puzzling still,
other unrelated pages that do contain the phrase:
podman-system-df (1) - Show podman disk usagequota (1) - display disk usage and limitsThe lesson holds for every use of apropos: search with the vocabulary of
the page, not your own. If an attempt returns nothing, rephrase with a synonym
closer to the jargon, or search several words at once with
apropos -a file space usage.
Troubleshooting
Many of these symptoms share one cause: the manual pages or their index are not on the machine. It is common on container images and minimal installations, where documentation is removed to save space. Before concluding that a command does not exist, check that its page exists, with man -w.
| Symptom | Cause | Fix |
|---|---|---|
No manual entry for xxx | Man page not installed | Install the man-db package and the command's package |
whatis: command not found or apropos: command not found | man-db not installed | sudo apt install man-db manpages (Debian) or sudo dnf install man-db man-pages (RHEL) |
apropos returns nothing appropriate | Man pages missing, index not built, or keyword absent from the descriptions | sudo mandb; then rephrase with the pages' vocabulary (space usage, not disk usage) |
apropos answers, but not with the expected command | The keyword exists in other pages | whatis <command> to read its actual description, then search with those words |
apropos silent although the index is up to date | The page was removed from disk | man -w <command> tells whether the page still exists |
tldr: command not found right after pipx install tldr | ~/.local/bin is not yet in the PATH of the session | pipx ensurepath, then open a new session (or source ~/.bashrc) |
tldr: command not found, pipx never run | Client not installed | Install it with pipx install tldr, then pipx ensurepath |
man cd answers No manual entry for cd | cd is a shell builtin, it has no man page | help cd, and type cd to confirm |
dnf install epel-release answers No match for argument | On RHEL 10, the package is not in the distribution repositories | Official EPEL procedure for RHEL 10 (see above) |
tldr returns nothing | Local database missing | Run tldr --update to download the sheets |
tldr --update fails with Did not find end of central directory signature | Buggy Haskell client (the tldr package from Debian/RHEL repositories) | Remove the system package (sudo apt remove tldr), then install the Python client: pipx install tldr |
--help prints too much text | Long output | Use ls --help | less to page through it |
Put it into practice
Finding things fast takes practice on real questions. The lab sets up a separate working folder on your workstation, with a donnees.txt file of five log lines. You extract three files from it: the last three lines, the number of lines, and only the lines that contain ERROR. For each one, you first look for the command with apropos, man or --help, then run it on your machine and write its output to the requested file. The check compares your files with the actual content of donnees.txt: naming the right command is not enough, you must produce the right result.
Writing to a file takes one more sign. A command normally prints its result on the screen. Add > file after the command and the result goes into that file instead of the terminal:
date > time.txtcat time.txtThe first line prints nothing, because the date went into time.txt; cat then displays it. If time.txt already exists, > replaces its content without asking, so never aim it at a file you want to keep, donnees.txt included.
Key points
--helpgives a quick reminder of a command's options.tldrshows practical examples ready to copy, ideal for commands you rarely use.manis the reference documentation. Type/to search, q to quit.aproposfinds a command by keyword when you do not know its name; a short word (copy) finds more pages than a phrase ("copy files").- A shell builtin such as
cdhas no man page: usehelp cd. whatisgives the one-line description of a known command.- A minimal installation may lack some of these tools: check with
command -v man apropos whatis infobefore installing anything. - The real skill is not to remember everything, it is knowing how to search fast.
Knowledge check
Make sure the essentials of this guide are yours. The questions only cover what was explained here.
Knowledge check
Check what you have learned with this interactive quiz
How it works
- The timer starts when you click Start
- Multiple choice, true/false and short answer questions
- You can move between questions
- Detailed results are shown at the end
Starts the quiz and the timer
Review
(0/0)Result saved on this device. It will be sent to your account at the next sync. Sync now
Score by domain
A domain groups several guides and gets several questions, so its score is more reliable than a per-topic score, which often rests on a single question.
Summary
Strengths
No topic passed at 80% on at least two questions yet.
Weak areas
No topic below the pass mark.
Recommended next
Hints before you try again?
Continue the course: Choose and automate a Linux server installation
A new full quiz with random questions
Work again only on the questions you missed