RED HAT ENTERPRISE LINUX

Getting Help
in Linux

Finding Documentation and Using Built-in Help

CIS126RH | RHEL System Administration 1
Mesa Community College

Learning Objectives

1
Read and navigate man pages

Use sections, search, and navigate man page content

2
Use the GNU info system

Navigate hyperlinked info documentation

3
Find help with --help and built-ins

Use command-line quick reference tools

4
Locate package documentation

Find README files, examples, and configuration samples

Linux Help Systems

man pages

The primary reference. Comprehensive, structured documentation for commands, system calls, config files.

GNU info

Hyperlinked documentation with detailed tutorials and examples, especially for GNU tools.

--help / -h

Quick option reference built into most commands. Fastest way to see flags and syntax.

Package Docs

READMEs, changelogs, example configs in /usr/share/doc/. Great for initial setup.

Introduction to man Pages

# 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
Tip: If a man page exists for both a command and a config file, use section numbers to specify: man 1 passwd (command) vs man 5 passwd (file format).

Man Page Sections

SectionContentExamples
1User commandsls, cp, grep, passwd
2System callsopen(), write(), fork()
3Library functionsprintf(), malloc()
4Special files (devices)/dev/null, /dev/sda
5File formats and conventions/etc/passwd, /etc/fstab
6Games and screensavers(rarely used)
7Miscellaneous / conventionssignal(7), regex(7)
8System admin commandsmount, useradd, sshd
RHCSA Tip: Sections 1, 5, and 8 are most frequently used. When a topic exists in multiple sections, specify the section number.

Navigating man Pages

Movement

Space / fPage forward
bPage backward
GGo to end
gGo to beginning
↑ ↓Scroll one line

Search & Exit

/patternSearch forward
?patternSearch backward
nNext match
NPrevious match
qQuit
Exam Tip: Use /EXAMPLES to jump to the examples section — many man pages have excellent practical examples.

Man Page Structure

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

Searching 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
Note: If man -k returns "nothing appropriate", run sudo mandb to rebuild the database.

GNU info System

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"
Key difference: Man pages are reference documentation. Info pages often include tutorials and more examples. For complex GNU tools like bash, grep, sed, and awk, info is more comprehensive.

Navigating info

Navigation

nNext node
pPrevious node
uUp (parent node)
lBack (history)
EnterFollow hyperlink
TabJump to next link

Search & Other

/patternSearch forward
?patternSearch backward
mGo to menu item
dGo to main directory
hHelp on info keys
qQuit

The --help Option

# 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
Tip: --help | grep is often the fastest way to find a specific flag when you remember the concept but not the exact option.

Shell Built-in Help

# 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
Important: Shell built-ins like cd, alias, for, if, and while are part of bash — they do not have man pages. Use help, not man.

Package Documentation

# 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
Tip: sample.sudoers, sample.conf, and README files in /usr/share/doc/ are invaluable starting points for configuration.

Finding the Right Documentation

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

Practical Examples

# 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

RHCSA Exam Tips

What to practice before the exam

  • Navigate man pages quickly
  • Use /EXAMPLES to find examples
  • Know section numbers (especially 5 and 8)
  • Use man -k to discover commands

During the exam

  • Man pages are fully available
  • Open multiple terminal tabs
  • Use man -k when unsure
  • Check /usr/share/doc/ for config examples

Key Takeaways

1

man commandname is the primary reference — use it first. Navigate with / to search and q to quit.

2

man -k keyword (apropos) discovers commands when you know the task but not the command name.

3

Section numbers matter: man 5 for file formats, man 8 for admin commands, man 1 for user commands.

4

Shell built-ins need help not man. Use type command to check if something is a built-in.

Graded Lab

  • Use man -k to find commands related to a topic
  • Navigate a man page and jump to the EXAMPLES section
  • Look up a configuration file format using section 5
  • Find documentation in /usr/share/doc/ for an installed package

Next: Managing Linux File Permissions