Sagar.BlogArticle
All posts
All posts
Linux

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.

January 3, 20258 min read
Linuxman pagesDocumentationBeginners

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

ToolBest forSpeed
command --helpQuick flag reminder⚡ Fastest
man commandFull reference manual📖 Complete
whatis commandOne-line description⚡ Instant
apropos keyword"What command does X?"🔍 Discovery
type commandIs it a builtin, alias, or file?⚡ Instant
tldr commandPractical 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 options

man: 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/passwd

Navigating Man Pages (less keybindings)

KeyAction
Space / fNext page
bPrevious page
j / Scroll down one line
k / Scroll up one line
/patternSearch forward
nNext search result
NPrevious search result
GJump to end
gJump to start
qQuit

Man pages are organized into sections (numbered 1–8). The same name can appear in multiple sections with different meanings:

Man Page Sections

SectionContainsExample
1User commandsman 1 ls
2System callsman 2 open
3C library functionsman 3 printf
4Special filesman 4 null
5File formats/configsman 5 passwd
8System admin commandsman 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/Fedora

type: 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
# alias

Decision: Which Help Tool?


Quick Check

`man passwd` and `man 5 passwd` both exist. What is the difference?

Quick Check

You want to find all commands related to disk management but don't know their names. Which tool do you use?

Exercise

Work through these tasks using only the built-in help tools:

  1. Use apropos to find commands for "rename files"
  2. Open the man page for find and search inside it for the -name option (hint: type /-name after opening)
  3. Use whatis to get descriptions for: dd, awk, nc, and curl
  4. Use type to check if ll is an alias on your system