Bookmark this page

Chapter 4. Getting Help in Red Hat Enterprise Linux

Abstract

Goal Resolve problems by using local help systems.
Objectives
  • Find information in local Linux system manual pages.

  • Find information from local documentation in GNU Info.

Sections
  • Reading Manual Pages (and Guided Exercise)

  • Reading Info Documentation (and Guided Exercise)

Lab

Getting Help in Red Hat Enterprise Linux

Reading Manual Pages

Objectives

After completing this section, you will be able to find information in local Linux system manual pages.

Introducing the man command

One source of documentation that is generally available on the local system are system manual pages or man pages These pages are shipped as part of the software packages for which they provide documentation, and can be accessed from the command line by using the man command.

The historical Linux Programmer's Manual, from which man pages originate, was large enough to be multiple printed sections. Each section contains information about a particular topic.

Table 4.1. Common Sections of the Linux Manual

Section

Content type

1

User commands (both executable and shell programs)

2

System calls (kernel routines invoked from user space)

3

Library functions (provided by program libraries)

4

Special files (such as device files)

5

File formats (for many configuration files and structures)

6

Games (historical section for amusing programs)

7

Conventions, standards, and miscellaneous (protocols, file systems)

8

System administration and privileged commands (maintenance tasks)

9

Linux kernel API (internal kernel calls)


To distinguish identical topic names in different sections, man page references include the section number in parentheses after the topic. For example, passwd(1) describes the command to change passwords, while passwd(5) explains the /etc/passwd file format for storing local user accounts.

To read specific man pages, use man topic. Contents are displayed one screen at a time. The man command searches manual sections in alphanumeric order. For example, man passwd displays passwd(1) by default. To display the man page topic from a specific section, include the section number argument: man 5 passwd displays passwd(5).

Navigate and Search Man Pages

The ability to efficiently search for topics and navigate man pages is a critical administration skill. GUI tools make it easy to configure common system resources, but using the command-line interface is still more efficient. To effectively navigate the command line, you must be able to find the information you need in man pages.

The following table lists basic navigation commands when viewing man pages:

Table 4.2. Navigating Man Pages

CommandResult
SpacebarScroll forward (down) one screen
PageDownScroll forward (down) one screen
PageUpScroll backward (up) one screen
DownArrowScroll forward (down) one line
UpArrowScroll backward (up) one line
DScroll forward (down) one half-screen
UScroll backward (up) one half-screen
/stringSearch forward (down) for string in the man page
NRepeat previous search forward (down) in the man page
Shift+NRepeat previous search backward (up) in the man page
GGo to start of the man page.
Shift+GGo to end of the man page.
QExit man and return to the command shell prompt

Important

When performing searches, string allows regular expression syntax. While simple text (such as passwd) works as expected, regular expressions use meta-characters (such as $, *, ., and ^) for more sophisticated pattern matching. Therefore, searching with strings that include program expression meta-characters, such as make $$$, might yield unexpected results.

Regular expressions and syntax are discussed in Red Hat System Administration II, and in the regex(7) man topic.

Reading Man Pages

Each topic is separated into several parts. Most topics share the same headings and are presented in the same order. Typically a topic does not feature all headings, because not all headings apply for all topics.

Common headings are:

Table 4.3. Headings

HeadingDescription
NAMESubject name. Usually a command or file name. Very brief description.
SYNOPSISSummary of the command syntax.
DESCRIPTIONIn-depth description to provide a basic understanding of the topic.
OPTIONSExplanation of the command execution options.
EXAMPLESExamples of how to use the command, function, or file.
FILESA list of files and directories related to the man page.
SEE ALSORelated information, normally other man page topics.
BUGSKnown bugs in the software.
AUTHORInformation about who has contributed to the development of the topic.

Searching for man pages by keyword

A keyword search of man pages is performed with man -k keyword, which displays a list of keyword-matching man page topics with section numbers.

[student@desktopX ~]$ man -k passwd
checkPasswdAccess (3) - query the SELinux policy database in the kernel.
chpasswd (8)          - update passwords in batch mode
ckpasswd (8)          - nnrpd password authenticator
fgetpwent_r (3)       - get passwd file entry reentrantly
getpwent_r (3)        - get passwd file entry reentrantly
...
passwd (1)            - update user's authentication tokens
sslpasswd (1ssl)      - compute password hashes
passwd (5)            - password file
passwd.nntp (5)       - Passwords for connecting to remote NNTP servers
passwd2des (3)        - RFS password encryption
...

Popular system administration topics are in sections 1 (user commands), 5 (file formats), and 8 (administrative commands). Administrators using certain troubleshooting tools also use section 2 (system calls). The remaining sections are generally for programmer reference or advanced administration.

Note

Keyword searches rely on an index generated by the mandb(8) command, which must be run as root. The command runs daily through cron.daily, or by anacrontab within an hour of boot, if out of date.

Important

The man command -K (uppercase) option performs a full-text page search, not just titles and descriptions like the -k option. A full-text search uses greater system resources and take more time.

References

man(1), mandb(8), man-pages(7), less(1), intro(1), intro(2), intro(5), intro(7), intro(8) man pages

Revision: rh124-8.2-df5a585