Man Pages in Linux: How to Actually Read Them
Table of Contents
Every command line tool you'll ever use ships with a built-in instruction manual, and most developers never read it. The man command puts the full documentation for ls, grep, cp, and hundreds of other programs one keystroke away, right in your terminal. Here's how man pages work, and how to actually find what you're looking for inside one.
All the content from our Boot.dev courses are available for free here on the blog. This one is the "Local CLI" chapter of Learn Linux. If you want to try the far more immersive version of the course, do check it out!
What Is the man Command?
The man command is short for "manual." It's a program that displays the manual for other programs.

A 3000-year-old photo of Moses instructing his people to "read the
f---ingfriendly manual"
I know that manuals and documentation can feel intimidating, but they'll become more useful to you as you become a more experienced developer. They're not as scary as they seem when you actually take the time to read them.
The man command will only work for programs that it has a manual for, but most built-in commands and Unix programs are supported. You just pass the name of the command as an argument. The most intuitive place to start, of course, is reading the manual's manual:
man man
The manual opens as an interactive session (a pager). Page through it with Space, and quit with Q.
How to Search Inside a Man Page
Most people don't just read man pages for fun. More often, the manual is used as a reference to quickly look up usage or special flags. You can search for text in the manual by pressing the / key and typing your search, then pressing Enter. Let's look up what the -r flag does for the ls command:
man ls
# type '/-r' to start searching
# press 'n' to jump to the next result
# press 'N' to go back if you went too far
man vs --help: Which Should You Use?
Man pages aren't the only built-in documentation. Most tools also support a --help flag (or -h) that prints a condensed usage summary straight to your terminal:
grep --help
The difference is depth. --help is a quick-start guide: the most common flags and arguments at a glance. The man page is the full reference: every flag, exit code, and edge case. I usually reach for --help first, and open the man page when I need the whole story.
Reading documentation in the terminal is a skill that compounds: the faster you can look things up, the less you have to memorize. If you want to build that muscle memory with guided practice (and man your way through some actual detective work), the Learn Linux course has you covered.
Frequently Asked Questions
What does the man command do in Linux?
The man command (short for manual) displays the built-in documentation for other programs, right in your terminal. Pass it a command name, like man ls, and it opens the full manual for that command in an interactive pager.
How do you exit a man page?
Press q to quit the pager and return to your shell prompt. You can page through the manual with the spacebar before quitting.
How do you search for text inside a man page?
Press the / key, type your search term, and press Enter. Then press n to jump to the next match and N to go back to the previous one.
What is the difference between man and --help?
The --help flag prints a condensed quick-start summary of a command's most common options, while the man page is the complete reference with every flag and edge case. Use --help for a fast reminder and man when you need the full documentation.
