Linux systems provide multiple ways to view documentation for commands—whether through brief usage instructions or extensive manuals. Knowing how to access command help ensures efficient learning, troubleshooting, and effective use of the CLI environment.
help for Shell BuiltinsThe help command displays documentation for shell builtins in Bash.
help cdThis shows usage details for cd, including options and exit status codes.
--help for Executable ProgramsMost external commands support a --help option to display basic usage and flags.
mkdir --helpOutput typically includes syntax, available options, and brief instructions.
man for Manual PagesManual pages provide detailed documentation for commands and system interfaces.
man lsThis opens the man page for ls, which includes a full description, syntax, option list, and exit status explanation.
| Section | Contents |
|---|---|
| 1 | User commands |
| 2 | System calls (kernel) |
| 3 | C library functions |
| 4 | Device files |
| 5 | File formats |
| 6 | Games |
| 7 | Miscellaneous |
| 8 | Admin commands |
man 5 passwdOpens the file format documentation for /etc/passwd, rather than the user command.
apropos for Keyword SearchesSearch for commands matching a keyword across all man page descriptions.
apropos partitionReturns related tools such as fdisk or cfdisk.
whatis for Brief DescriptionsGet a one-line summary of a command’s purpose.
whatis lsReturns: ls (1) - list directory contents, indicating section 1.
info for Structured DocumentationInfo pages are hyperlinked documents offering detailed GNU references.
info coreutils| Command | Action |
|---|---|
? | Show help menu |
Page Up | Previous page |
Page Down | Next page |
n | Next section |
p | Previous section |
Q | Exit |
Linux provides layered access to command documentation suited to different needs:
help for shell builtins--help for quick summariesman for complete manualsapropos to find related commandswhatis for brief explanationsinfo for structured, cross-referenced guidesBy mastering these tools, users can quickly find accurate information and enhance their command-line skills.