Getting Help
Here's a secret: nobody memorizes all the commands and their options.
Not even people who've used Linux for decades. The difference between a beginner and an expert isn't memorization - it's knowing how to find answers quickly.
The --help Flag
Almost every command supports --help:
This gives you a quick summary of what the command does and its most common options.
Quick Reference
When you just need a reminder of the flags, --help is faster than man pages.
man - The Manual Pages
For detailed documentation, use man (manual):
This opens a full documentation page. Navigate with:
- Arrow keys or j/k to scroll
- Space to page down
- b to page back
- / to search (then Enter)
- q to quit
Man Pages Can Be Dense
Man pages are comprehensive but not always beginner-friendly. If you're confused, that's normal. Use them as reference, not tutorials.
man Page Sections
Man pages are organized into sections:
| Section | Content |
|---|---|
| 1 | User commands |
| 2 | System calls |
| 3 | Library functions |
| 4 | Device files |
| 5 | File formats |
| 6 | Games |
| 7 | Miscellaneous |
| 8 | System admin commands |
Usually you just run man command, but sometimes you need to specify the section:
man 1 printf # The printf command
man 3 printf # The printf C function
tldr - Too Long; Didn't Read
Man pages are thorough, but sometimes you just want examples. Enter tldr:
tldr gives you practical examples, not documentation. It's community-maintained and covers most common use cases.
Installing tldr
tldr might not be installed by default. Install it with sudo apt install tldr (Debian/Ubuntu), brew install tldr (Mac), or npm install -g tldr.
Online Resources
Sometimes the best help isn't on your machine:
cheat.sh - Community-driven cheat sheets right in your terminal:
curl cheat.sh/tar
curl cheat.sh/find
explainshell.com - Paste any command and it breaks down every part visually. Perfect for understanding complex commands you find online.
Don't Copy-Paste Blindly
Before running any command you find online, use explainshell.com to understand what it does. Never run something you don't understand, especially if it involves sudo or rm.
apropos - Search for Commands
Don't know which command to use? Search by keyword:
This searches all man pages for the keyword. Super useful when you know what you want to do but not the command name.
whatis - Quick Description
Get a one-line description of a command:
type - What Kind of Command Is This?
Some commands are shell built-ins, some are external programs:
This matters sometimes when troubleshooting path issues or when a command behaves unexpectedly.
which - Find Command Location
Find where a command lives:
Useful when you have multiple versions installed and need to know which one you're running.
The Help Hierarchy
When you need help, try in this order:
command --help- Quick syntax remindertldr command- Practical examplescurl cheat.sh/command- Online cheat sheetman command- Full documentationapropos keyword- Find the right command- explainshell.com - Understand complex commands
- Web search - Last resort
Quick Reference
| Command | What It Does |
|---|---|
command --help | Show brief help |
man command | Show full manual |
tldr command | Show practical examples |
apropos keyword | Search for commands |
whatis command | One-line description |
type command | Show command type |
which command | Show command location |
Which command gives you practical examples rather than full documentation?
Key Takeaways
- Use
--helpfor quick syntax reminders - Use
tldrfor practical examples (install it if needed) - Use
manfor comprehensive documentation - Use
aproposto find commands by keyword - Nobody memorizes everything - knowing how to find help is the real skill
Congratulations! You've completed Chapter 1. You now understand what the terminal is, why Linux matters, and how to help yourself when stuck.
Next chapter: we dive into the file system. Time to learn how to navigate like a pro.