man
Overview
The man
command displays system reference manuals. It provides detailed documentation for commands, file formats, system calls, library functions, and more.
Syntax
man [options] [section] page
Common Options
Option | Description |
---|---|
-f |
Same as whatis |
-k |
Same as apropos |
-w |
Show manual file path |
-a |
Show all pages |
-K |
Search for string |
-l |
Local file |
-p pager |
Choose pager |
-t |
Format for printing |
-H browser |
HTML browser |
-S list |
Manual sections |
-M path |
Manual path |
Manual Sections
Section | Content |
---|---|
1 | User commands |
2 | System calls |
3 | Library functions |
4 | Special files |
5 | File formats |
6 | Games |
7 | Miscellaneous |
8 | System administration |
9 | Kernel routines |
Key Use Cases
- Command reference
- System documentation
- Programming help
- Configuration info
- Troubleshooting
Examples with Explanations
Example 1: View Manual
man ls
Show ls command manual
Example 2: Specific Section
man 5 passwd
Show passwd file format
Example 3: Search Pages
man -k directory
Search for directory-related pages
Common Usage Patterns
Quick reference:
man command
Find command:
man -k keyword
All sections:
man -a command
Additional Resources
Best Practices
- Use sections
- Search effectively
- Read thoroughly
- Take notes
- Cross-reference
Documentation Types
- Commands
- Configuration
- Programming
- System
- Standards
Troubleshooting
- Missing pages
- Display issues
- Search problems
- Path configuration
- Language settings