> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Help within RHEL

> Guide to finding and using on-system documentation in Red Hat Enterprise Linux, covering man pages, --help, info, man -k, mandb, and /usr/share/doc

This guide explains how to find and use on-system documentation in Red Hat Enterprise Linux (RHEL). Think of the machine's built-in docs as your local server manual: you can look up commands, options, configuration formats, and examples without needing an Internet connection.

Primary on-system documentation tools you will use frequently:

* The manual pages: `man <command>`
* A command's short usage summary: `<command> --help`
* The GNU info system: `info <command>`

Quick examples:

```bash theme={null}
man ls
ls --help
info ls
```

<Callout icon="lightbulb" color="#1CB2FE">
  Man pages are the canonical local reference on RHEL. Use `--help` for quick usage summaries and `info` when a program provides more verbose, tutorial-style documentation.
</Callout>

## man pages: structure and navigation

Man pages (the `man` system) provide detailed reference material for commands, configuration files, system calls, libraries, and administration tools. Typical sections of a man page include:

* NAME
* SYNOPSIS
* DESCRIPTION
* OPTIONS
* EXAMPLES
* FILES
* SEE ALSO

Common navigation keys (man uses the `less` pager by default):

* Space — scroll down one page
* Enter — scroll down one line
* b or B — scroll up one page
* `/pattern` — search forward for pattern
* n — repeat search in same direction
* N — repeat search in opposite direction
* g — jump to top of page
* G — jump to bottom of page
* q — quit the man page

Man pages are organized into numbered sections. Use the section number to disambiguate entries with the same name.

| Section | Contents |
| - | - |
| `1` | User commands (programs you run from a shell) |
| `2` | System calls (kernel interfaces) |
| `3` | Library functions (C library, etc.) |
| `4` | Special files (usually devices, under `/dev`) |
| `5` | File formats and configuration files |
| `6` | Games and screensavers |
| `7` | Miscellaneous (conventions, macro packages) |
| `8` | System administration commands (root-only tasks) |

You can request a specific section; for example:

```bash theme={null}
man 1 passwd   # view the passwd command
man 5 passwd   # view the passwd file format / configuration
```

### Example: viewing the `ls` manual

To read the `ls` man page:

```bash theme={null}
man ls
```

Inside you will find the NAME, SYNOPSIS (how to call it), and the DESCRIPTION with all options and explanations. Use the search and navigation keys above to find the option or example you need quickly — most people query a man page for a specific flag or usage pattern rather than reading it end-to-end.

If you want a short, human-friendly summary of commonly used options:

```bash theme={null}
ls --help
```

For more structured, tutorial-like documentation (when available), try `info`:

```bash theme={null}
info coreutils 'ls invocation'
```

## Searching the manual database

If you only know a keyword but not the exact command name, `man -k` (or `apropos`) searches the man short descriptions (the whatis database):

```bash theme={null}
man -k user
# or equivalently
apropos user
```

If `man -k` returns nothing useful, the manual index might be out of date. Rebuild the man database with `mandb`; this typically requires root privileges:

```bash theme={null}
sudo mandb
```

<Callout icon="warning" color="#FF6B6B">
  `mandb` must be run with appropriate privileges (usually via `sudo` or as root) to rebuild the system man database. Running it as an unprivileged user will not update the global index.
</Callout>

After rebuilding, search again:

```bash theme={null}
man -k user
```

Example (trimmed) output might include:

```text theme={null}
useradd (8)    - create a new user or update default new user information
userdel (8)    - delete a user account and related files
usermod (8)    - modify a user account
users (1)      - print the user names of users currently logged in
whoami (1)     - print effective user name
```

From this output you can choose which command matches your intent (for example, use `useradd` to create new users).

## Examples of section disambiguation

Some names appear in multiple man sections. Use the section number to pick the intended topic:

```bash theme={null}
man 1 passwd   # the passwd command for changing passwords
man 5 passwd   # the passwd file format (e.g., /etc/passwd)
```

## Package-specific documentation: /usr/share/doc

Not all documentation lives in man pages. Many installed packages place additional files under `/usr/share/doc`. These directories often contain README files, FAQs, examples, and sometimes HTML documentation.

List installed package documentation:

```bash theme={null}
ls /usr/share/doc | less
```

Inspect a specific package (example: Bash):

```bash theme={null}
cd /usr/share/doc/bash
ls
# typical files: bash.html  bashref.html  FAQ  INTRO  RBASH  README
less INTRO
```

Files such as `INTRO`, `README`, and `FAQ` can provide background material, configuration examples, and troubleshooting hints that are not always present in man pages.

## Tips and best practices

* Use `man` for authoritative, on-system references and exact option syntax.
* Use `--help` for quick summaries and common options.
* Use `info` for programs that offer more tutorial-style documentation.
* Use `man -k` or `apropos` to find commands by keyword. If results look stale, run `sudo mandb` to rebuild the index.
* Search inside man pages with `/pattern` and navigate between matches with `n` and `N`.
* Look for an EXAMPLES section in complex man pages — practical examples are often the fastest way to learn how to use a command.
* When scripting or automating, prefer reading the SYNOPSIS and OPTIONS sections to avoid unexpected behavior.

## Further reading and references

* [Red Hat Enterprise Linux Documentation](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux)
* `man` — local manual pages on your system (`man man`)
* GNU info manual: [https://www.gnu.org/software/texinfo/manual/info.html](https://www.gnu.org/software/texinfo/manual/info.html)

This article has shown how to locate, read, and use local system documentation on RHEL using `man`, `--help`, `info`, `man -k`/`apropos`, `mandb`, and files under `/usr/share/doc`. You do not need to memorize everything — learn how to find authoritative details quickly and apply them when you need them.

<CardGroup>
  <Card title="Watch Video" icon="video" cta="Learn more" href="https://learn.kodekloud.com/user/courses/red-hat-certified-system-administrator-rhcsa/module/9884b7b6-7d0b-4d00-8403-fc6d3adc7bf0/lesson/c6434185-ef2f-42bd-b971-c338f50d0fbb" />

  <Card title="Practice Lab" icon="flask-conical" cta="Learn more" href="https://learn.kodekloud.com/user/courses/red-hat-certified-system-administrator-rhcsa/module/9884b7b6-7d0b-4d00-8403-fc6d3adc7bf0/lesson/dbe3f243-6dcd-4e31-8299-cbafc8d43861" />
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.