π οΈ 1. man β Manual Pages
Displays the full manual (documentation) for a command.
man lsπΉ Scroll with arrow keys or spacebar, exit with q.
You can also search inside the man page using / followed by a keyword.
π§© 2. --help Option
Most commands support --help to show a quick summary of usage and options.
ls --helpβ
Good for quick reference (less detailed than man).
π 3. info β GNU Info System
Gives detailed documentation in a tree structure, often more in-depth than man.
info coreutils 'ls invocation'Use Tab, Enter, and arrow keys to navigate. Press q to quit.
π§ͺ 4. whatis β Short Description
Gives a one-line summary of a command.
whatis grepOutput:
grep (1) - print lines matching a pattern
π 5. apropos β Search for Commands by Keyword
Searches all man pages for a keyword.
apropos copyUseful if you donβt know the exact command name.
π§΅ 6. type β Find Out What a Command Is
Shows whether a command is built-in, an alias, or an external binary.
type cdOutput:
cd is a shell builtin
π 7. help β For Bash Built-in Commands
Use help for built-in Bash commands like cd, echo, if, etc.
help cdπ 8. Tab Completion & compgen
Hit the Tab key once or twice to autocomplete commands or filenames.
You can also list available commands:
compgen -cπ§ Bonus: tldr β Simplified Help Pages (if installed)
Provides simplified and community-maintained help pages.
tldr tarYou may need to install it first:
sudo apt install tldrorsudo yum install tldr.
π Summary
| Tool | Purpose |
|---|---|
man | Full manual page |
--help | Quick options and usage |
info | Structured, detailed documentation |
whatis | One-line command description |
apropos | Search man pages by keyword |
type | Show command type (builtin, etc.) |
help | Help for Bash built-ins |
tldr | Community-simplified command help |
| Basic - Command Line Interface |