RED HAT ENTERPRISE LINUX
Getting Help in Linux
Using Local Help Systems and Documentation
CIS126RH | RHEL System Administration 1 Mesa Community College
Welcome to this essential module on getting help in Linux. One of the most valuable skills you can develop as a Linux administrator is knowing how to find answers yourself. Linux systems come with extensive built-in documentation, and learning to navigate these resources will make you self-sufficient and effective. Today we'll cover the major help systems: man pages, info documents, the --help option, and documentation files. We'll also discuss strategies for finding the right information quickly. By the end of this session, you'll be able to resolve problems using the documentation that's already installed on your system - a skill that's especially important during certification exams where internet access isn't available.
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
We have four learning objectives today. First, we'll master man pages - the traditional Unix documentation system. You'll learn to navigate them efficiently, understand their structure, and search across all man pages to find what you need. Second, we'll explore the GNU info system, which provides more detailed, hyperlinked documentation for many commands. Third, we'll cover quick help options - the --help flag that most commands support and the help built-in for shell commands. Fourth, we'll learn where to find package documentation files, configuration examples, and README files on the filesystem. Together, these skills ensure you can find answers without internet access - essential for the RHCSA exam and for working in secure environments where external resources may not be available.
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.
Linux provides multiple documentation systems, each with different strengths. Man pages are the traditional Unix documentation - they're comprehensive reference material installed with almost every command. When you need to know what options a command supports or what a configuration file format looks like, man pages are usually your first stop. Info documents are the GNU project's hypertext documentation system. They often provide more tutorial-style content with links between related topics. Some commands, especially GNU utilities, have more complete documentation in info than in man. The --help option is supported by most commands and gives you a quick summary right in your terminal. It's perfect when you just need to remember an option name. Finally, /usr/share/doc contains package-specific documentation: README files, configuration examples, changelogs, and more. A good workflow is to start with --help for quick lookups, move to man for detailed reference, and check /usr/share/doc for examples and additional context.
Introduction to man Pages
The man command displays manual pages - the primary documentation for commands, configuration files, system calls, and more.
man ls
man passwd
man 5 passwd
man -k "copy files"
man -k password
man -f passwd
The man command is your gateway to Linux documentation. At its simplest, you type man followed by a command name to see its documentation. But man pages cover more than just commands - they document configuration files, system calls, library functions, and more. This is where sections become important. The same name might exist in multiple sections - for example, passwd is both a command and a configuration file. By default, man shows the first match, but you can specify a section number to get exactly what you need. man 5 passwd shows the file format documentation, not the command. The -k option searches man page descriptions, which is incredibly useful when you don't know the exact command name. If you want to copy files but don't remember the command, "man -k copy files" will help. The -f option, equivalent to the whatis command, shows which sections have pages for a given name. Understanding these basics opens up the entire man page system.
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)
Man pages are organized into numbered sections, each covering a different type of documentation. Section 1 contains user commands - the everyday tools you'll use most. Section 2 documents system calls, which are the interfaces between programs and the kernel - important for programmers. Section 3 covers library functions like those in the C standard library. Section 4 describes special files, particularly device files in /dev. Section 5 is extremely important for system administrators - it documents file formats and configuration files. When you need to understand the syntax of /etc/fstab or /etc/passwd, section 5 is where you look. Section 6 is for games - not many systems have these installed. Section 7 contains miscellaneous documentation like overviews of regular expressions or signal handling. Section 8 documents system administration commands - things that typically require root privileges like mount, useradd, and systemctl. For RHCSA preparation, focus on sections 1, 5, and 8. When you see a reference like passwd(5), the number in parentheses indicates the section.
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 pages are displayed using the less pager, so if you know less navigation, you already know how to navigate man pages. For movement, Space or Page Down advances one screen, while b or Page Up goes back. The j and k keys move one line at a time, matching vim navigation. g goes to the beginning of the document, G goes to the end. Searching is powerful - type forward slash followed by a pattern to search forward through the document. Question mark searches backward. After finding a match, n goes to the next match, N to the previous. q quits the man page. If you forget these, h shows help for the less pager itself. A practical tip: most man pages have an EXAMPLES section near the end. When you open a man page, try typing /EXAMPLES and pressing Enter to jump directly to practical examples. This is often faster than reading the entire options list. These navigation skills will serve you well - less is used for viewing many types of files in Linux.
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
Man pages follow a standard structure that, once you understand it, makes finding information fast. The NAME section gives the command name and a one-line description - this is what man -k searches. SYNOPSIS shows the command syntax, using conventions to indicate what's optional and what's required. Square brackets mean optional, ellipsis means you can repeat the item, vertical bar means choose one alternative. Bold text is typed literally; italic or underlined text represents something you replace with your actual value. DESCRIPTION provides detailed explanation of what the command does. OPTIONS lists every flag and what it does - often the longest section. EXAMPLES shows practical usage - jump here first when you need to use a command quickly. FILES lists related configuration files. SEE ALSO points to related commands and documentation - great for discovering related tools. EXIT STATUS explains what return codes mean, useful for scripting. Understanding this structure means you know exactly where to look for different types of information, saving time when you need answers quickly.
Searching Man Pages
man -k "search pattern"
man -k partition
apropos partition
man -k '^ls$'
sudo mandb
man -k -s 5 password
whatis ls
ls (1) - list directory contents
⚠ If man -k returns nothing: Run sudo mandb to rebuild the search database.
Searching across all man pages is essential when you don't know the exact command name. The man -k command, also available as apropos, searches the NAME sections of all man pages for your pattern. This is invaluable when you know what you want to do but not the command name. For example, "man -k partition" finds commands related to disk partitioning. You can use regular expressions in your search - "^ls$" finds exact matches for "ls" only, not everything containing those letters. If searches return "nothing appropriate" even for commands you know exist, the man page database probably needs rebuilding. Run sudo mandb to update it - this creates the searchable index from all installed man pages. You can limit searches to specific sections with -s, which is useful when you're looking specifically for configuration files (section 5) or admin commands (section 8). The whatis command, equivalent to man -f, shows just the NAME line for a command - useful for a quick reminder of what something does without opening the full man page.
GNU info System
The info command provides hypertext documentation with nodes, menus, and cross-references. Often more detailed than man pages for GNU utilities.
info coreutils
info ls
info bash
pinfo ls
info ls --output=-
When to use info: GNU tools (bash, coreutils, grep, sed, awk) often have better documentation in info than man pages.
The GNU info system is an alternative documentation format that provides hypertext-style navigation. While man pages are flat documents, info documents are organized into nodes with menus and cross-references, more like a web of interconnected pages. For many GNU utilities, the info documentation is more comprehensive than the man page. The bash info page, for example, is essentially a complete book on shell programming. The coreutils info page covers all the basic file utilities like ls, cp, mv in detail. To access info documentation, use the info command followed by the topic. The interface is different from man - it has its own navigation system we'll cover next. Some people find info navigation confusing; if so, you can use pinfo as an alternative viewer with more intuitive controls, or pipe info output to less for familiar navigation. Not all commands have info pages - when you run info on a command that lacks one, it often falls back to showing the man page. Info is most valuable for GNU project software where developers maintained both formats.
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
info bash "Shell Expansions"
Within info: Press 'i' then type topic name
Info navigation differs from man pages because of its node-based structure. Think of info documents as a tree of nodes, where each node is like a chapter or section. The n key moves to the next node at the same level, p to the previous, and u goes up to the parent node. t goes to the top of the document. l (lowercase L) takes you back to the last node you visited - like a browser's back button. When you see a menu or links (marked with asterisks), pressing Enter on them follows the link. Space scrolls down through the current node and automatically advances to the next node when you reach the end - you can read an entire info document just by pressing space repeatedly. Forward slash or s starts a search, and curly brace finds the next match. The most powerful navigation is pressing i for index - this lets you search the document's index for specific topics and jump directly to them. Question mark shows help, and q quits. While info navigation has a learning curve, it's powerful for navigating large documents like the bash or emacs manuals.
The --help Option
ls --help
cp --help
systemctl --help
df -h
tar --help
systemctl --help | less
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.
The --help option is the fastest way to get basic usage information for most commands. Nearly every Linux command supports it, displaying a summary of options and usage directly to your terminal. This is perfect when you know the command but need a quick reminder of an option name or syntax. The output is usually more concise than a man page - just the essentials. Be aware that -h sometimes means something other than help. For example, df -h means "human-readable output" not help; you'd use df --help for help. When --help output is longer than your screen, pipe it to less for paging. Even more useful is piping to grep to find specific options. If you know you need something related to "recursive" in cp, "cp --help | grep recursive" instantly shows you -r, -R, and --recursive as your options. This grep technique is faster than opening a man page and searching. Note that --help typically doesn't provide detailed explanations or examples - for those, fall back to man pages. Think of --help as a quick reference card and man pages as the complete manual.
Shell Built-in Help
help
help cd
help alias
help for
help [
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!
Some commands are built into the shell itself rather than being external programs. Commands like cd, alias, export, and source are bash built-ins. These don't have man pages because they're not separate programs - they're part of bash. For these, use the help command. Running help without arguments lists all available built-ins. Running help followed by a built-in name shows its documentation. This is important because if you try "man cd" you might find nothing or get an unhelpful page about POSIX conventions. The type command helps you identify whether something is a built-in, an alias, or an external command. "type cd" shows it's a built-in. "type ls" might show it's aliased to "ls --color=auto". "type grep" shows the path to the external program. When you're troubleshooting or looking for documentation, knowing what type of command you're dealing with helps you look in the right place. For built-ins, use help. For external commands, use --help and man. The bash man page itself also documents all built-ins, but help is more convenient for quick lookups.
Package Documentation
ls /usr/share/doc/
ls /usr/share/doc/bash/
CHANGES COPYING NEWS README RBASH
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
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.
Beyond man and info pages, packages install documentation files to /usr/share/doc/. This directory is a treasure trove that many administrators overlook. Each installed package typically has a subdirectory here containing README files, license information, changelogs, and often example configuration files. For example, the sudo package includes a sample.sudoers file showing configuration examples. The sshd package might include example configurations. When you're setting up a service for the first time, check its documentation directory for examples. The rpm -qd command lists all documentation files installed by a package, showing you the complete set of man pages, info pages, and other docs. This is helpful when you're not sure what documentation is available. On RHEL, documentation might be in a separate package - for instance, some packages have a -doc subpackage with additional documentation. If the /usr/share/doc directory for a package seems sparse, check if there's a documentation package available to install. These files are especially valuable for complex software where man pages only scratch the surface.
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
Let's establish a systematic workflow for finding documentation. When you just need a quick reminder of syntax or options, --help is fastest - you don't even leave your terminal. For detailed reference information - what exactly does an option do, what are all the possibilities - open the man page. When you're looking at a configuration file and need to understand its format, remember to check section 5: man 5 followed by the filename. If you know what you want to do but not the command, search with man -k. Try different keywords until you find relevant commands. When you're setting up something new and want examples, look in /usr/share/doc for the package - there's often a sample configuration or README that gets you started faster than reading the man page from scratch. For shell built-ins that don't have man pages, use help. Following this workflow means you'll find answers quickly regardless of what type of information you need. During exams, this systematic approach helps you avoid wasting time looking in the wrong places.
Practical Examples
man -k compress
man tar
man 5 crontab
man -k "group"
man usermod
usermod --help | grep -i group
ls --help | head -30
help for
Let's walk through practical scenarios. Scenario one: you need to compress a directory. You might not remember if it's tar, gzip, or something else. Start with "man -k compress" to see relevant commands. Once you identify tar, open its man page and search for EXAMPLES to see real-world usage. Scenario two: you're editing crontab and need to understand the time field format. The crontab command has a man page, but the file format is in section 5: "man 5 crontab" shows the field meanings. Scenario three: you need to add a user to a group but don't remember the syntax. Search for group-related commands, find usermod, then either read its man page or quickly grep its --help output for group-related options. You'll find -aG. Scenario four: you know ls well but forgot a specific option. "ls --help" gives you a quick reference without opening a full man page. Scenario five: you're writing a script and need for loop syntax. cd is a shell built-in, so "man for" won't help - use "help for" instead. Practice these patterns and they'll become automatic.
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.
For the RHCSA exam, the documentation skills we've covered are critically important. You have no internet access during the exam, so local documentation is your only reference. The good news is that everything you need to pass is documented on the system itself. Don't try to memorize every command and option - there's too much. Instead, practice finding information quickly. Get comfortable with man -k searches so you can find commands when you know what you want to do but not the command name. Practice navigating man pages efficiently - jump to EXAMPLES, search for specific options. Remember section 5 for configuration file formats. Check /usr/share/doc when you need examples to start from. Use --help for quick syntax reminders. The exam is about completing tasks, so efficient documentation lookup means more time for actual work. Before the exam, practice looking up commands you already know - this builds speed. During the exam, if you forget a command, don't panic. man -k will help you find it. The ability to find answers is more valuable than memorizing them.
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
Let's summarize our documentation toolkit. Man pages are your primary resource - learn to navigate them efficiently, remember sections 1, 5, and 8, and use man -k to search when you don't know the command name. Info documents provide more detailed tutorials for GNU tools; they're especially valuable for bash and the core utilities. The --help option gives you quick reference without leaving your workflow, and the help command documents shell built-ins that don't have man pages. The /usr/share/doc directory contains treasure that many overlook - example configurations, detailed READMEs, and package-specific documentation. In your lab exercises, practice each of these tools. Find partition-related commands with man -k. Look up the fstab format in section 5. Navigate the bash info page to find variable expansion. Use help to learn about read. Explore /usr/share/doc for a package you use. Developing fluency with these documentation tools makes you a more effective and self-sufficient administrator. Next module, we'll build on this foundation with 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
Let's summarize our documentation toolkit. Man pages are your primary resource - learn to navigate them efficiently, remember sections 1, 5, and 8, and use man -k to search when you don't know the command name. Info documents provide more detailed tutorials for GNU tools; they're especially valuable for bash and the core utilities. The --help option gives you quick reference without leaving your workflow, and the help command documents shell built-ins that don't have man pages. The /usr/share/doc directory contains treasure that many overlook - example configurations, detailed READMEs, and package-specific documentation. In your lab exercises, practice each of these tools. Find partition-related commands with man -k. Look up the fstab format in section 5. Navigate the bash info page to find variable expansion. Use help to learn about read. Explore /usr/share/doc for a package you use. Developing fluency with these documentation tools makes you a more effective and self-sufficient administrator. Next module, we'll build on this foundation with essential command line skills.