CIS126RH | RHEL System Administration 1
Mesa Community College
Use sections, search, and navigate man page content
Navigate hyperlinked info documentation
Use command-line quick reference tools
Find README files, examples, and configuration samples
The primary reference. Comprehensive, structured documentation for commands, system calls, config files.
Hyperlinked documentation with detailed tutorials and examples, especially for GNU tools.
Quick option reference built into most commands. Fastest way to see flags and syntax.
READMEs, changelogs, example configs in /usr/share/doc/. Great for initial setup.
# View the manual page for a command
man ls
# View man page for a config file (section 5)
man passwd # Shows the command
man 5 passwd # Shows the file format
# Search man page descriptions
man -k "copy files"
man -k password
# Show all available sections for a topic
man -f passwd # Same as: whatis passwd
man 1 passwd (command) vs man 5 passwd (file format).
| Section | Content | Examples |
|---|---|---|
| 1 | User commands | ls, cp, grep, passwd |
| 2 | System calls | open(), write(), fork() |
| 3 | Library functions | printf(), malloc() |
| 4 | Special files (devices) | /dev/null, /dev/sda |
| 5 | File formats and conventions | /etc/passwd, /etc/fstab |
| 6 | Games and screensavers | (rarely used) |
| 7 | Miscellaneous / conventions | signal(7), regex(7) |
| 8 | System admin commands | mount, useradd, sshd |
Space / f | Page forward |
b | Page backward |
G | Go to end |
g | Go to beginning |
↑ ↓ | Scroll one line |
/pattern | Search forward |
?pattern | Search backward |
n | Next match |
N | Previous match |
q | Quit |
/EXAMPLES to jump to the examples section — many man pages have excellent practical examples.
NAME
Command name and one-line description
SYNOPSIS
Syntax summary — brackets mean optional, | means or
DESCRIPTION
Detailed explanation of behavior
OPTIONS
All flags and their effects
EXAMPLES
Practical usage examples — jump to with /EXAMPLES
SEE ALSO
Related commands and man pages
# Search man page descriptions (apropos)
man -k "search pattern"
man -k partition
apropos partition # Same as man -k
# Search for exact word
man -k '^ls$'
# Update the man page database (if searches fail)
sudo mandb
# Search within specific section
man -k -s 5 password
# Show brief description of a command
whatis ls # Same as man -f
ls (1) - list directory contents
man -k returns "nothing appropriate", run sudo mandb to rebuild the database.
GNU info provides more detailed documentation than man pages for GNU tools, with hyperlinks and a table of contents.
# Open info for a topic
info ls
info bash
info coreutils
# Open the top-level info directory
info
# Open a specific node in info
info bash "pattern matching"
n | Next node |
p | Previous node |
u | Up (parent node) |
l | Back (history) |
Enter | Follow hyperlink |
Tab | Jump to next link |
/pattern | Search forward |
?pattern | Search backward |
m | Go to menu item |
d | Go to main directory |
h | Help on info keys |
q | Quit |
# Most commands support --help
ls --help
cp --help
systemctl --help
# Some use -h (short form, but -h may mean something else!)
df -h # Note: -h here means "human readable"
tar --help # --help is safer
# Pipe to less for long output
systemctl --help | less
# Pipe to grep to find specific options
cp --help | grep -i recursive
-r, -R, --recursive copy directories recursively
--help | grep is often the fastest way to find a specific flag when you remember the concept but not the exact option.
# List all shell built-ins
help
# Get help on specific built-in
help cd
help alias
help for
help [ # Help for the test command
# Check if command is built-in or external
type cd
cd is a shell builtin
type ls
ls is aliased to 'ls --color=auto'
type grep
grep is /usr/bin/grep
cd, alias, for, if, and while are part of bash — they do not have man pages. Use help, not man.
# Documentation directory — look here first
ls /usr/share/doc/
# View package documentation
ls /usr/share/doc/bash/
CHANGES COPYING NEWS README RBASH
# Find all documentation files for an installed package
rpm -qd bash
/usr/share/doc/bash/CHANGES
/usr/share/doc/bash/COPYING
/usr/share/info/bash.info.gz
/usr/share/man/man1/bash.1.gz
# Example configuration files
ls /usr/share/doc/sudo/
CONTRIBUTORS ChangeLog NEWS README sample.sudoers
sample.sudoers, sample.conf, and README files in /usr/share/doc/ are invaluable starting points for configuration.
I know the command name, need details on options:
→ man commandname or commandname --help
I want to do something, don't know the command:
→ man -k "keyword" or apropos keyword
I need the config file format:
→ man 5 filename (e.g., man 5 crontab, man 5 sudoers)
I need to configure a newly installed package:
→ ls /usr/share/doc/packagename/ for examples and README
# Scenario 1: How do I compress a directory?
man -k compress
man tar # Then /EXAMPLES to see examples
# Scenario 2: What is the crontab file format?
man 5 crontab # Section 5 for file formats
# Scenario 3: How do I add a user to a group?
man -k "group"
man usermod # Find -aG option
usermod --help | grep -i group
# Scenario 4: What options does ls support?
ls --help | head -30 # Quick overview of options
# Scenario 5: How do I write a bash for loop?
help for # Built-in — use help, not man
/EXAMPLES to find examplesman -k to discover commandsman -k when unsure/usr/share/doc/ for config examplesman commandname is the primary reference — use it first. Navigate with / to search and q to quit.
man -k keyword (apropos) discovers commands when you know the task but not the command name.
Section numbers matter: man 5 for file formats, man 8 for admin commands, man 1 for user commands.
Shell built-ins need help not man. Use type command to check if something is a built-in.
man -k to find commands related to a topic/usr/share/doc/ for an installed package