Getting Help
One of the best things about Linux commands is that they come with built-in documentation. You never need to memorize every flag for every command — you just need to know how to look them up.
man — The Manual Pages
What it does: Opens the full manual page for any command.
Try it now: Type man ls
You’ll see a detailed page explaining everything ls can do — every flag, every option, with examples. Manual pages are organized into sections:
- NAME — the command name and a short description
- SYNOPSIS — how to use it (the syntax)
- DESCRIPTION — what it does in detail
- OPTIONS — every available flag explained
Navigating man Pages
When you’re inside a man page:
| Key | Action |
|---|---|
| Space or Page Down | Scroll down one page |
| b or Page Up | Scroll up one page |
| / then type a word | Search for a word |
| n | Jump to next search result |
| q | Quit and return to the terminal |
Try it now: Type man grep — browse the manual, then press q to exit.
Yes, you can ask an AI tool "what does ls -t do?" But knowing how to read
man pages makes you self-sufficient. When you're on a server with no internet, or when you want to verify what an AI told you, man is always there.
–help — The Quick Reference
What it does: Shows a shorter, more concise help message.
Try it now: Type ls --help
Instead of a full manual page, you get a compact summary of all the available flags. This is faster than man when you just need to look up one flag.
Most commands support --help. Some also accept -h as a shortcut for help (though be careful — for ls, -h means “human-readable sizes,” not help).
which — Find Where a Command Lives
What it does: Shows you the full path to a command’s executable file.
Try it now: Type which ls
You’ll see something like /usr/bin/ls — that’s where the ls program actually lives on disk.
Try it: Type which cat and which mkdir to see where those commands are located.
Why which Is Useful
- Checking if a command is installed: If
which nodereturns nothing, Node.js isn’t installed - Finding which version you’re running: When you have multiple versions of a tool installed,
whichtells you which one your terminal is using - Debugging path issues: If a command isn’t working,
whichhelps you figure out if the right version is being found
man command — full manual (most detail)command --help — quick reference (concise)which command — where the command lives on diskBetween these three and your AI assistant, you can figure out any command.
Practice
Try looking up help for commands you’ve already learned:
man cat— read the manual, then pressqto quitmkdir --help— see the quick reference for mkdirwhich cat— find where cat lives on the system