RED HAT ENTERPRISE LINUX

Getting Help
in Linux

Using Local Help Systems and Documentation

CIS126RH | RHEL System Administration 1
Mesa Community College

Learning Objectives

1
Use man pages effectively

Navigate, search, and understand manual page sections

2
Access info documentation

Navigate the GNU info system for detailed documentation

3
Use command-line help options

Get quick help with --help and built-in shell help

4
Find documentation files

Locate README files, examples, and package documentation

Linux Help Systems

man pages

Traditional Unix manual pages. Comprehensive reference for commands, files, and system calls.

info documents

GNU hypertext documentation. Often more detailed tutorials with navigation between topics.

--help option

Quick command-line help. Shows options and basic usage without leaving your workflow.

/usr/share/doc

Package documentation. README files, examples, changelogs, and additional docs.

Pro Tip: Start with --help for quick reference, use man for details, check /usr/share/doc for examples.

Introduction to man Pages

The man command displays manual pages - the primary documentation for commands, configuration files, system calls, and more.

# View the manual page for a command
man ls

# View man page for a config file
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
man -f passwd        # Same as: whatis passwd

Man Page Sections

Section Content Type Example
1 User commands ls, cp, grep, bash
2 System calls (kernel) open, read, fork
3 Library functions printf, malloc, pthread_create
4 Special files (devices) /dev/null, /dev/sda
5 File formats & conventions passwd, fstab, crontab
6 Games fortune
7 Miscellaneous regex, signal, boot
8 System administration mount, useradd, systemctl
Most Used: Section 1 (commands), Section 5 (config files), Section 8 (admin commands)

Navigating man Pages

Man pages use the less pager - same navigation keys

Movement:

Space / Page Down - Next page
b / Page Up - Previous page
or j - Down one line
or k - Up one line
g - Go to beginning
G - Go to end

Searching:

/pattern - Search forward
?pattern - Search backward
n - Next match
N - Previous match
q - Quit
h - Help for less

Search Tip: Type /EXAMPLES to jump directly to the examples section - often the most useful part!

Man Page Structure

NAME
Command name and brief description
SYNOPSIS
Usage syntax and options format
DESCRIPTION
Detailed explanation of command
OPTIONS
All available flags explained
EXAMPLES
Practical usage examples
FILES
Related configuration files
SEE ALSO
Related commands and pages
EXIT STATUS
Return codes meaning
BUGS / AUTHOR
Known issues, credits
Synopsis Notation: [ ] = optional, ... = repeatable, | = alternatives, BOLD = literal, italic = replaceable

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
whatis ls               # Same as man -f
ls (1)    - list directory contents
⚠ If man -k returns nothing: Run sudo mandb to rebuild the search database.

GNU info System

The info command provides hypertext documentation with nodes, menus, and cross-references. Often more detailed than man pages for GNU utilities.

# View info documentation
info coreutils           # GNU core utilities overview
info ls                  # Info page for ls command
info bash                # Comprehensive bash documentation

# Read info page as plain text (pager)
pinfo ls                 # Alternative viewer (if installed)
info ls --output=-       # Output to stdout
When to use info: GNU tools (bash, coreutils, grep, sed, awk) often have better documentation in info than man pages.

Navigating info

Node Navigation:

n - Next node
p - Previous node
u - Up to parent node
t - Top (first) node
l - Last node visited
Enter - Follow link at cursor

Movement & Search:

Space - Scroll down / next node
Backspace - Scroll up
/ or s - Search
} - Search next
q - Quit
? - Help

# Quick access to specific node
info bash "Shell Expansions"

# Jump to index and search
Within info: Press 'i' then type topic name

The --help Option

# Most commands support --help
ls --help
cp --help
systemctl --help

# Some use -h (short form)
df -h                    # Note: -h here means "human readable"!
tar --help

# 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
Quick Tip: Use command --help | grep keyword to quickly find the option you need.

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 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 (cd, alias, export, etc.) don't have man pages - use help instead!

Package Documentation

# Documentation directory
ls /usr/share/doc/

# View package documentation
ls /usr/share/doc/bash/
CHANGES  COPYING  NEWS  README  RBASH

# Find documentation for 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
Gold Mine: /usr/share/doc/ often contains example configuration files, tutorials, and README files not available elsewhere.

Finding the Right Documentation

1
Quick reminder? → Use command --help
2
Detailed reference? → Use man command
3
Config file format? → Use man 5 filename
4
Don't know the command? → Use man -k keyword
5
Need examples? → Check /usr/share/doc/package/
6
Shell built-in? → Use help builtin

Practical Examples

# Scenario 1: How do I compress a directory?
man -k compress
man tar              # /EXAMPLES to see examples

# Scenario 2: What's 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 look at options

# Scenario 5: How do I write a bash for loop?
help for             # Built-in, use help not man

RHCSA Exam Tips

During the exam, you have no internet access - local documentation is your only reference!

Do:

  • Practice using man -k to find commands
  • Learn to search within man pages (/pattern)
  • Know section numbers (5 for configs)
  • Check /usr/share/doc for examples
  • Use --help for quick syntax checks

Don't:

  • Memorize everything - know how to find it
  • Spend too long reading - scan for relevant parts
  • Forget about shell built-ins (help)
  • Ignore the EXAMPLES section
  • Panic if you forget a command name
Exam Strategy: Spend time before the exam practicing documentation navigation - it's faster than memorizing everything.

Key Takeaways

1

man is the primary documentation - learn sections (1, 5, 8) and search with man -k

2

info provides detailed hypertext docs for GNU tools like bash and coreutils

3

--help gives quick summaries; help for shell built-ins

4

/usr/share/doc contains examples, READMEs, and package-specific docs

Next: Essential Command Line Skills

Graded Lab

  • Use man -k to find commands for managing disk partitions
  • Find the format for /etc/fstab using the correct man section
  • Navigate info bash and find the section on variable expansion
  • Use help to learn about the read built-in command
  • Find example configuration files in /usr/share/doc

Next: Registering Systems for Red Hat Support