Man pages (manual pages) are the primary built-in documentation system in Linux. They provide detailed information about commands, system calls, configuration files, and more.
Section
Content
Examples
1
User commands
ls, cp, grep, ssh
2
System calls
open, read, write
3
Library functions
printf, malloc
4
Device files
null, zero, tty
5
File formats
passwd, fstab, hosts
6
Games
fortune
7
Miscellaneous
ascii, regex, hier
8
Admin commands
useradd, fsck, mount
# Basic usage
man command_name
man ls
# Specific section
man 5 passwd # File format
man 1 passwd # Command
# View all sections
man -a passwd
# Find man page location
man -w ls
# Search by keyword
apropos keyword
man -k keyword
# Short description
whatis command
# Update man database
sudo mandb
# While viewing a man page:
Space # Next page
b # Previous page
/pattern # Search forward
n # Next search result
g # Go to beginning
G # Go to end
q # Quit
h # Help
NAME
Brief description
SYNOPSIS
Command syntax
[optional] = Optional argument
<required> = Required argument
... = Can repeat
| = OR (choose one)
DESCRIPTION
Detailed information
OPTIONS
Available flags and parameters
EXAMPLES
Usage examples
SEE ALSO
Related commands
man 5 passwd # /etc/passwd format
man 5 group # /etc/group format
man 5 shadow # /etc/shadow format
man 5 fstab # Filesystem table
man 5 hosts # Host names
man 5 resolv.conf # DNS configuration
man 5 crontab # Cron format
man 7 hier # Filesystem hierarchy
man 7 ascii # ASCII table
man 7 regex # Regular expressions
man 7 signal # Signals overview
man 8 useradd # Add users
man 8 groupadd # Add groups
man 8 fsck # Filesystem check
man 8 mount # Mount filesystems
man 8 systemctl # System control
# Quick help (fastest)
ls --help
grep --help
ssh -h
# GNU documentation (more detailed)
info ls
info coreutils
# Navigation in info:
n # Next node
p # Previous node
u # Up
# For shell built-ins
help cd
help for
help if
# Search for network-related commands
apropos network
# Find what provides a file
apropos "copy files"
# Check command type
type command_name
which command_name
whereis command_name
# Documentation location
/usr/share/doc/package_name/
# View package docs
ls /usr/share/doc/openssh-server/
zless /usr/share/doc/package/README.gz
# Set pager
export MANPAGER="less"
# View man path
echo $MANPATH
manpath
# Get help (in order of speed)
command --help # Fastest
whatis command # One-line description
man command # Full documentation
info command # Detailed (GNU tools)
What are the 8 main sections of man pages?
What command views a man page?
How do you view section 5 of the passwd man page?
man 5 passwd
What's the difference between man 1 passwd and man 5 passwd?
man 1 passwd
man 1 passwd = passwd command
man 5 passwd = /etc/passwd file format
What command searches man pages by keyword?
apropos keyword or man -k keyword
What command shows a one-line description of a command?
whatis command_name
How do you search forward in a man page?
Press / then type search term, press Enter. Use n for next match.
/
n
What key quits a man page?
q
What are the main navigation keys in man pages?
Space = Next page
b = Previous page
g = Beginning
G = End
q = Quit
How do you update the man page database?
What does [option] mean in SYNOPSIS section?
[option]
Optional argument (can be omitted)
What does ... mean in SYNOPSIS section?
...
The preceding item can be repeated
What does | mean in SYNOPSIS section?
|
OR - choose one of the alternatives
What command shows the file location of a man page?
man -w command_name
How do you view all available sections for a command?
man -a command_name
What section contains configuration file formats?
Section 5
What section contains system administration commands?
Section 8
What man page shows the filesystem hierarchy?
man 7 hier or man hier
man 7 hier
man hier
How do you view /etc/fstab file format documentation?
man 5 fstab
What command shows quick help without opening man pages?
command --help or command -h
command --help
command -h
How do you get help for bash built-in commands?
help command_name (e.g., help cd)
help command_name
What are info pages?
GNU's hypertext documentation system with hierarchical structure and cross-references
How do you view an info page?
info command_name
What are the main info navigation keys?
n = Next node
p = Previous node
u = Up
Where is package documentation stored?
How do you determine if a command is built-in or external?
What command shows the full path of an executable?
What command shows binary, source, and man page locations?
What's the fastest way to get help for a command?
What are the three quick help methods in order?
command --help (fastest)
whatis command (one-line)
man command (detailed)
man command
How do you view the /etc/passwd file format?
How do you view crontab file format?
man 5 crontab
What man page shows signal documentation?
man 7 signal
How do you view regex documentation?
man 7 regex
What command shows ASCII table?
man 7 ascii
How do you view /etc/hosts file format?
man 5 hosts
What man page documents DNS resolver configuration?
man 5 resolv.conf
How do you search for network-related commands?
apropos network or man -k network
man -k network
What does MANPATH contain?
Colon-separated directories where man pages are stored
How do you view the current man path?
echo $MANPATH or manpath
Know the sections:
Section 1 = Commands
Section 5 = Config files (IMPORTANT)
Section 8 = Admin commands (IMPORTANT)
Master navigation:
/ for search
Space/b for pages
q to quit
Search skills:
apropos for finding commands
whatis for quick info
man -k for keyword search
Important man pages:
man 5 passwd, fstab, hosts
man 8 useradd, systemctl
# Daily practice
apropos file
whatis cp
Find help quickly (--help)
--help
Search for commands (apropos)
apropos
View config file format (man 5)
man 5
Navigate man pages efficiently
Distinguish between sections
Use built-in help (help cd)
man command # View manual
man 5 file # Section 5
apropos keyword # Search
whatis command # Brief info
command --help # Quick help
help builtin # Shell built-in
Use --help first (fastest)
Remember section numbers: 1, 5, 8
Use apropos to discover commands
Check EXAMPLES section first
Use / to search within pages
Zuletzt geändertvor einem Monat