How to Access Man Pages in Linux
The quickest way to access man pages in linux is to open a terminal and type man followed by the command name, for example man ls. That opens the manual page for the command, where you can read usage, options, examples, and related documentation.
What are man pages?
Man pages, short for manual pages, are built-in documentation for Linux and Unix-style systems. They explain how commands work, what options they accept, and often include notes about files, environments, return values, and examples.
If you are learning the command line or trying to understand an unfamiliar command, man pages are usually the first place to look. They are written in a standard format, which makes them consistent across many tools.
How to open a man page
To open a manual page, use this basic syntax:
man command_nameExamples:
man ls
man grep
man cdIf the command has a manual page installed, it opens in a pager, usually less. That means you can scroll through the document instead of seeing everything at once.
Open a specific section when needed
Some names appear in more than one manual section. In that case, you can specify the section number explicitly:
man 5 passwd
man 2 read
man 1 printfThis is useful when the same word refers to both a command and a configuration file or system call.
How to navigate inside man
When a man page opens, you are inside a text viewer. The most common controls are simple and keyboard based.
| Action | Key or command |
|---|---|
| Scroll down one line | Down arrow or Enter |
| Scroll up one line | Up arrow |
| Move down one page | Spacebar or Page Down |
| Move up one page | Page Up or b |
| Search forward | / followed by text |
| Repeat search | n |
| Go back to previous search result | N |
| Exit the manual page | q |
For most users, the most important key is q, which quits the man page and returns you to the terminal.
How to search within a man page
If a manual page is long, search inside it instead of scrolling line by line.
- Open the page with
man. - Type
/and then your search term. - Press Enter.
- Use
nto jump to the next match.
Example:
man grepThen type:
/ignore-caseThis is especially helpful for finding options, environment variables, or section headings quickly.
How to find the right command when you do not know the exact name
If you know what you want to do but not the exact command name, use apropos or man -k to search manual page descriptions.
apropos network
man -k networkBoth commands look through short descriptions from installed man pages and list matches. This is useful when you are trying to discover the right tool before opening its manual.
You can also use whatis for a brief one-line summary of a command:
whatis lsA practical workflow looks like this:
- Use
aproposorman -kto find a likely command. - Open its manual with
man command_name. - Search inside the page with
/if you need a specific option.
How man page sections work
Linux manual pages are organized into sections. Knowing the sections helps when a name appears more than once.
| Section | Typical content |
|---|---|
| 1 | User commands and programs |
| 2 | System calls |
| 3 | Library functions |
| 4 | Special files and device files |
| 5 | File formats and conventions |
| 6 | Games and screensavers |
| 7 | Miscellaneous and overview topics |
| 8 | System administration commands |
For example, passwd may have a user command page in section 1 and a file format page in section 5. If you want the file documentation, you would run man 5 passwd.
What to do if a man page is missing
If man says a page is not found, the cause is usually one of these:
- The manual page is not installed on your system.
- You typed the command name incorrectly.
- The documentation package is missing, especially on minimal installations.
- The page exists in a different section than the one you expected.
Try these checks:
- Confirm the command name with
which command_nameor by checking your shell history. - Search for related entries with
apropos keyword. - Try a specific section, such as
man 8 command_nameorman 5 filename. - Install the relevant documentation package if your distribution separates man pages from the main program.
On some systems, especially minimal servers or container images, man pages are intentionally absent until you install the manual database or documentation packages.
Helpful man command options
These options can make man pages easier to use:
- man -f command, similar to
whatis, shows a short summary. - man -k keyword, similar to
apropos, searches descriptions. - man -a command opens all matching sections one by one.
- man section command opens a specific section directly.
Example:
man -a printfThis can be useful when you want to review every manual entry for the same name.
Quick man command cheat sheet
Use this as a fast reference when working at the terminal:
man ls, open the manual forlsman 5 passwd, open a specific section/word, search inside the manual pagen, jump to the next search matchq, quit the man viewerapropos keyword, search manual page descriptionsman -k keyword, same idea asaproposwhatis command, show a one-line summaryman -f command, same idea aswhatis
Frequently Asked Questions About how to access man pages in linux
How do I open a man page in Linux?
Type man followed by the command name, such as man pwd or man grep.
How do I exit a man page?
Press q to quit and return to the terminal.
How do I search for a command in man pages?
Use apropos keyword or man -k keyword to search descriptions across installed manual pages.
What does the section number in man pages mean?
The section number tells you what kind of documentation you are opening, such as user commands, system calls, or file formats.
Why is a man page not found?
The page may not be installed, the command name may be wrong, or the documentation may live in a different section.
What is the difference between man and apropos?
man opens the full manual page for a specific topic, while apropos searches short descriptions to help you find the right topic first.
Conclusion
If you want to know how to access man pages in linux, the main command is simple: use man in the terminal, then add the command or topic you want to read about. Once the manual opens, you can scroll, search, and quit with a few basic keys. Learning apropos, whatis, and manual sections makes it much easier to find the right documentation when you are not sure what to look for.
