~2 min read • Updated Jul 18, 2025
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.
Using help for Shell Builtins
The help command displays documentation for shell builtins in Bash.
help cdThis shows usage details for cd, including options and exit status codes.
Using --help for Executable Programs
Most external commands support a --help option to display basic usage and flags.
mkdir --helpOutput typically includes syntax, available options, and brief instructions.
Using man for Manual Pages
Manual 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.
Man Page Sections
| 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 |
Specifying Section Numbers
man 5 passwdOpens the file format documentation for /etc/passwd, rather than the user command.
Using apropos for Keyword Searches
Search for commands matching a keyword across all man page descriptions.
apropos partitionReturns related tools such as fdisk or cfdisk.
Using whatis for Brief Descriptions
Get a one-line summary of a command’s purpose.
whatis lsReturns: ls (1) - list directory contents, indicating section 1.
Using info for Structured Documentation
Info pages are hyperlinked documents offering detailed GNU references.
info coreutilsInfo Navigation Commands
| Command | Action |
|---|---|
? | Show help menu |
Page Up | Previous page |
Page Down | Next page |
n | Next section |
p | Previous section |
Q | Exit |
Conclusion
Linux provides layered access to command documentation suited to different needs:
- Use
helpfor shell builtins - Use
--helpfor quick summaries - Use
manfor complete manuals - Use
aproposto find related commands - Use
whatisfor brief explanations - Use
infofor structured, cross-referenced guides
By mastering these tools, users can quickly find accurate information and enhance their command-line skills.
Written & researched by Dr. Shahin Siami