/usr/share/doc/
DirectoryWe'll start with manual pages (called "man pages"), explore additional documentation directories, and learn about release notes and changelogs that help you stay current with system changes.
After completing the work in this module you will be able to:
-k
option to the man
command to find specific manual page./usr/share/doc/
directory to research installed packages.By the end of this module, you'll have practical skills for getting help independently. You'll know how to use manual pages to find command options and understand their layout, use the man -k
command to search for help topics, navigate the /usr/share/doc/
directory for additional documentation, and understand why release notes and changelogs matter for system administrators. These are essential skills that will make you more confident and self-sufficient as a Linux user.
As system administrators, we work with hundreds of commands and countless options - nobody can memorize them all. The good news is that Red Hat Enterprise Linux comes with comprehensive built-in documentation that doesn't require an internet connection. This includes manual pages for nearly every command, configuration examples, and detailed explanations that help you work efficiently and avoid mistakes that could affect system stability.
Nearly every command in Linux has a manual page, or "man page" for short. For example, if you want to learn about the mkdir
command, you simply type man mkdir
at the terminal. The man page will show you the command's syntax, a detailed description, all available options like -p
for creating parent directories, and often include practical examples. Think of man pages as the definitive reference manual that's always available on your system.
Manual pages are organized into numbered sections to help you find the right information quickly. Section 1 contains user commands like ls
and cp
, section 5 covers configuration files like /etc/passwd
, and section 8 contains system administration utilities like mount
and useradd
. Today we'll focus on these three sections since they're most relevant for system administration tasks, though there are other sections for programming and kernel functions.
Most manual pages follow a standard structure that makes them easy to navigate once you know what to expect. The NAME section gives a brief description, SYNOPSIS shows the command syntax with required and optional parameters, DESCRIPTION provides detailed explanations, OPTIONS lists all available flags, EXAMPLES shows practical usage, and SEE ALSO points to related commands. The Synopsis section is particularly helpful because it uses standard notation where square brackets indicate optional parameters.
Manual pages are displayed using a program called a "pager," typically less
, which lets you scroll through long documents easily. Use the spacebar or f to move forward one screen, b to go back, and q to quit and return to your command prompt. You can search within a man page by typing / followed by your search term, then press n to find the next occurrence of that term. These navigation skills will make you much more efficient when reading documentation.
When you're not sure which command does what you need, use man -k
followed by a keyword to search manual page descriptions. For example, man -k passwd
will show you results like passwd(1) for the password-changing command and passwd(5) for the password file format. The numbers in parentheses indicate which manual section contains that information, helping you choose the right documentation for your needs.
When we use the man command without specifying a section, Linux defaults to searching section 1 of the manual, which contains user commands. For example, typing man passwd will open the page describing the passwd command used to change a user’s password.
However, many manual page topics exist in multiple sections. The passwd keyword is one such case. In section 5, passwd refers not to the command but to the password file format stored in /etc/passwd. This file holds essential user account information such as usernames, user IDs, group IDs, home directories, and default shells.
To explicitly open the manual entry from section 5, we use the syntax:
man 5 passwd
This command tells the system: "Show me the documentation for passwd in section 5 of the manual.
It is important to distinguish between these two because section 1 documents how to run the command, while section 5 documents the structure of a critical configuration file. Understanding this distinction helps administrators interpret and manage system files correctly.
Once you're viewing a manual page, you can search for specific terms by pressing /, typing your search term, and pressing Enter. If the first match isn't what you're looking for, press n to jump to the next occurrence of that term, or N to go to the previous one. This is especially useful in long manual pages where you need to find specific options or examples quickly.
Beyond manual pages, Linux systems include additional documentation in the /usr/share/doc/
directory, organized by package name. Here you'll find configuration examples, template files, README documents, and detailed changelogs that manual pages don't cover. For instance, the nano
text editor includes a sample configuration file called sample.nanorc
that you can copy to your home directory and customize for your preferences.
Practice finding relevant information by using man options and arguments.️
Each version of Red Hat Enterprise Linux comes with detailed release notes that document new features, deprecated programs, security updates, and known issues. Reading release notes before installing or upgrading systems is crucial for system administrators because they help you understand what changes might affect your environment. These notes can prevent surprises and help you plan for necessary configuration changes.
Changelogs accompany software packages and provide detailed records of bug fixes, feature additions, and security patches included in each version. You can find these under /usr/share/doc/
within each package's directory, or sometimes as separate changelog files. Understanding changelogs helps you troubleshoot issues, track security updates, and understand why certain behaviors might have changed between software versions.
man
command is used to display the manual page for commands and configuration files.-k
option to the man command is used to find commands by keyword.mandb
command updates the manual page index.Let's review the key points from today's session: use the man
command to access comprehensive documentation for any command, remember that manual sections 1, 5, and 8 are most relevant for system administration, use man -k
to search for commands by keyword, navigate manual pages efficiently using search functions, explore /usr/share/doc/
for additional documentation and examples, stay informed through release notes before system changes, and keep your manual page database current with mandb
when needed.
For continued learning, I recommend bookmarking man7.org, which provides online access to manual pages and excellent tutorials on Linux system programming. The Red Hat Enterprise Linux Product Documentation portal offers comprehensive guides for all RHEL versions, and the "Keep a Changelog" website explains best practices for understanding software changes. There's also a helpful YouTube video linked in your course materials that demonstrates these concepts visually.
For this module, you’ll complete two quizzes instead of a full lab. There's extra credit available if you want more practice.
Thank you for your attention and participation. If you have questions, please ask now or follow up via the course platform. See you in the next module!
Created on 17 February 2025 by Dennis Kibbe. Last modified on 2 September by DNK.
Keyboard Shortcuts
Today we're going to learn how to find help when you're stuck or need to understand a Linux command better. This module covers the built-in documentation system that comes with every Red Hat Enterprise Linux installation, so you'll never be without help even on systems without internet access. This slide presentation was created by B6Plus. The audio accompanying this presentation is AI-generated.