Getting help: man pages, info, –help, apropos, whatis, tldr

Linux Essentials Preparation · lesson 8 of 23 · 25 min

Getting Help on the Command Line

Linux has extensive built-in documentation. Knowing how to find help is a core skill — you will not memorise every command option, but you will know where to look.

man [command] — manual pages. The primary documentation system. man ls opens the ls manual. Navigate with arrow keys, search with /, quit with q.

Man page sections: 1=user commands, 2=system calls, 3=library functions, 4=device files, 5=file formats, 6=games, 7=miscellaneous, 8=system admin commands. Specify section: man 5 passwd (passwd file format vs man 1 passwd for the command).

[command] –help — quick summary of options. Faster than man pages for a quick reference. Example: ls --help.

info [command] — GNU info system. More detailed than man pages for GNU tools. Hyperlinked. Navigate with n (next), p (previous), q (quit).

apropos [keyword] — searches man page descriptions for a keyword. Useful when you know what you want to do but not the command name. Example: apropos compress.

whatis [command] — one-line description of a command. Example: whatis ls → “ls (1) – list directory contents”.

type [command] — shows whether a command is a shell built-in, alias, or external binary. Example: type cd → “cd is a shell builtin”.

which [command] — shows the full path of an external command. Example: which python3 → /usr/bin/python3.

Exam Tip

apropos searches man page descriptions by keyword. whatis gives a one-line summary. man 5 passwd = file format; man 1 passwd = command. –help is fastest for quick option lookup.

Key Terms

Key Terms

Knowledge Check — 8 Questions

Linux Essentials — Getting Help

Which command opens the manual page for ls?

  • help ls
  • ls –man
  • man ls
  • info –ls

Answer: man ls
man [command] opens the manual page. Navigate with arrow keys, search with /, quit with q.

apropos compress will:

  • Compress a file
  • Search man page descriptions for the word “compress”
  • Show the compress manual
  • List compressed files
  • Answer: Search man page descriptions for the word “compress”

apropos searches the man page database by keyword — useful when you know what you want to do but not the exact command name. man 5 passwd shows:

  • The passwd command manual
  • The /etc/passwd file format documentation
  • Section 5 of all man pages
  • Password security guidelines
  • Answer: The /etc/passwd file format documentation

Man section 5 = file formats. man 5 passwd describes the /etc/passwd file format. man 1 passwd = the passwd command. The fastest way to see available options for a command is:

  • man [command]
  • info [command]
  • [command] –help
  • apropos [command]
  • Answer: [command] –help

–help gives a quick summary of options — much faster than reading the full man page when you just need a flag. whatis ls displays:

  • All ls options
  • A one-line description of ls
  • The ls source code
  • The ls binary location
  • Answer: A one-line description of ls

whatis gives a brief one-line description from the man page database: “ls (1) – list directory contents”. which python3 shows:

  • The Python version
  • The full path to the python3 binary
  • Python3 documentation
  • Python3 installed packages
  • Answer: The full path to the python3 binary

which shows where a command binary is located: /usr/bin/python3. Useful when multiple versions are installed. type cd reveals that cd is:

  • An external binary in /bin
  • A shell built-in
  • An alias
  • A function
  • Answer: A shell built-in

cd is a shell built-in — it is part of the shell itself, not an external binary. type distinguishes builtins from external commands.

To quit a man page, press the _____ key.

Answer: q
Man pages use the less pager — press q to quit, / to search, n for next match, arrow keys to scroll.


Previous lesson: Navigating the filesystem: absolute vs relative paths, ls options, hidden files, file types
Back to Linux Essentials Preparation
Next lesson: File operations: cp, mv, rm, mkdir, find, grep, sort, wc, head, tail, cat, less