How to Get Help in Linux: man, --help, apropos & More
You don't need to memorize every flag. Learn to use --help, man pages, whatis, apropos, and tldr to find answers without leaving the terminal.
One of the most important Linux skills isn't memorizing commands — it's knowing how to find information. The Linux terminal ships with a complete built-in documentation system. No Google required.
Help Tools at a Glance
| Tool | Best for | Speed |
|---|---|---|
command --help | Quick flag reminder | ⚡ Fastest |
man command | Full reference manual | 📖 Complete |
whatis command | One-line description | ⚡ Instant |
apropos keyword | "What command does X?" | 🔍 Discovery |
type command | Is it a builtin, alias, or file? | ⚡ Instant |
tldr command | Practical examples (install needed) | 💡 Beginner-friendly |
--help: The Quick Reference
Almost every Linux command accepts --help (or -h) and prints a short usage summary. This is the fastest way to jog your memory about a flag you've forgotten.
Use --help when:
- You know the command but forgot a specific option
- You want a quick reminder without opening a full manual
- The full man page is too long for what you need
ls --help # See all ls options
cp --help # See all cp options
grep --help | head -30 # Pipe to head if output is too long
tar --help 2>&1 | grep "\.gz" # Search --help output for .gz optionsman: The Full Manual
man (short for manual) opens the complete, authoritative documentation for any command. Every option, every edge case, every exit code.
Man pages open in a pager called less. You are not editing anything — just reading. Press q to quit.
man ls # Full manual for ls
man grep # Full manual for grep
man man # The manual for man itself!
man 5 passwd # Section 5 = file format of /etc/passwdNavigating Man Pages (less keybindings)
| Key | Action |
|---|---|
Space / f | Next page |
b | Previous page |
j / ↓ | Scroll down one line |
k / ↑ | Scroll up one line |
/pattern | Search forward |
n | Next search result |
N | Previous search result |
G | Jump to end |
g | Jump to start |
q | Quit |
Man pages are organized into sections (numbered 1–8). The same name can appear in multiple sections with different meanings:
Man Page Sections
| Section | Contains | Example |
|---|---|---|
| 1 | User commands | man 1 ls |
| 2 | System calls | man 2 open |
| 3 | C library functions | man 3 printf |
| 4 | Special files | man 4 null |
| 5 | File formats/configs | man 5 passwd |
| 8 | System admin commands | man 8 mount |
Why it matters: man passwd shows the command. man 5 passwd shows the /etc/passwd file format. Completely different!
whatis: One-Line Description
whatis gives you a single-sentence summary of a command. Perfect for quickly checking what something does without reading a full man page. You can ask about multiple commands at once:
whatis ls
# ls (1) - list directory contents
whatis grep sed awk
# grep (1) - print lines that match patterns
# sed (1) - stream editor for filtering and transforming text
# awk (1) - pattern scanning and processing language
whatis passwd
# passwd (1) - change user password
# passwd (5) - the password file ← two entries! two sections!apropos: Find the Command You Need
apropos is the answer to "I know what I want to do, but I don't know the command." It searches the man page descriptions for a keyword and returns all matching commands.
This is the Linux equivalent of Stack Overflow's "how do I…" — but it never breaks.
apropos is identical to man -k.
apropos "copy files"
# cp (1) - copy files and directories
# rsync (1) - fast, versatile remote file copy
apropos "disk space"
# df (1) - report file system disk space usage
# du (1) - estimate file space usage
apropos compress
# gzip (1) - compress or expand files
# bzip2 (1) - block-sorting file compressor
# xz (1) - compress or decompress .xz files
# If apropos returns nothing, update its database:
sudo mandb # Debian/Ubuntu
sudo makewhatis # RHEL/Fedoratype: What Kind of Command Is It?
type tells you what a command actually is before you run it. This matters because commands can be:
- Shell builtins — built into bash/zsh (faster, no man page in section 1)
- External files — programs on disk at a path like
/usr/bin/grep - Aliases — shortcuts to other commands (check your
.bashrc) - Functions — shell functions defined in config files
type ls
# ls is aliased to 'ls --color=auto'
type cd
# cd is a shell builtin
type grep
# grep is /usr/bin/grep
type if
# if is a shell keyword
# Show all possible matches
type -a echo
# echo is a shell builtin
# echo is /usr/bin/echo
# Show just the type word
type -t ls
# aliasDecision: Which Help Tool?
`man passwd` and `man 5 passwd` both exist. What is the difference?
You want to find all commands related to disk management but don't know their names. Which tool do you use?
Work through these tasks using only the built-in help tools:
- Use
aproposto find commands for "rename files" - Open the man page for
findand search inside it for the-nameoption (hint: type/-nameafter opening) - Use
whatisto get descriptions for:dd,awk,nc, andcurl - Use
typeto check ifllis an alias on your system