Man Pages (RHCSA series)
6 min read
The Linux Manual or Man Command
We will start by learning how to find information from the local Linux system manual pages. To me, this is a very important objective. I spent hours learning from others on how to do one task to another. When all I needed to do was read the documentation that is generally available on the local system. System Manual Pages or man pages. These pages are shipped as part of the software packages that are used in the linux system.
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.
Admittedly, at first; they are daunting to read but after some understanding of the sections and some practice I guarantee it will be the first place you look when looking for a new approach to something. Man pages are large, in fact so that they have been broken down into sections. The following table shows a breakdown of them.
To determine identical topic names in different sections, the 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).
|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)|
Searching Through the MAN Sections.
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 the most efficient way. To effectively navigate the command line, you must be able to find the information you need in man pages.
|Spacebar||Scroll forward (down) one screen|
|PageDown||Scroll forward (down) one screen|
|PageUp||Scroll backward (up) one screen|
|DownArrow||Scroll forward (down) one line|
|UpArrow||Scroll backward (up) one line|
|D||Scroll forward (down) one half-screen|
|U||Scroll backward (up) one half-screen|
|/string||Search forward (down) for string in the man page|
|N||Repeat previous search forward (down) in the man page|
|Shift+N||Repeat previous search backward (up) in the man page|
|G||Go to start of the man page.|
|Shift+G||Go to end of the man page.|
|Q||Exit 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 RH234, and in the regex(7) man topic.
Understanding the MAN pages
Most topics share the same headings and are presented in the same order. Not all topics feature all headings, because not all headings apply for all topics. Common headings are:
|NAME||Subject name. Usually a command or file name. Very brief description.|
|SYNOPSIS||Summary of the command syntax.|
|DESCRIPTION||In-depth description to provide a basic understanding of the topic.|
|OPTIONS||Explanation of the command execution options.|
|EXAMPLES||Examples of how to use the command, function, or file.|
|FILES||A list of files and directories related to the man page.|
|SEE ALSO||Related information, normally other man page topics.|
|BUGS||Known bugs in the software.|
|AUTHOR||Information about who has contributed to the development of the topic.|
One of the most efficient way to use Man is by the
-k option. This will display a list of keyword-matching man page topics with section numbers.
dallas@spohnz ~ () $ man -k passwd checkPasswdAccess (3) - query the SELinux policy database in the kernel chpasswd (8) - update passwords in batch mode gpasswd (1) - administer /etc/group and /etc/gshadow grub2-mkpasswd-pbkdf2 (1) - Generate a PBKDF2 password hash. kpasswd (1) - change a users Kerberos password ldappasswd (1) - change the password of an LDAP entry lpasswd (1) - Change group or user password lppasswd (1) - add, change, or delete digest passwords. mkpasswd (1) - generate new password, optionally apply it to a user pam_localuser (8) - require users to be listed in /etc/passwd passwd (1) - update users authentication tokens sslpasswd (1ssl) - compute password hashes pwhistory_helper (8) - Helper binary that transfers password hashes from passwd or ... saslpasswd2 (8) - set a users sasl password selinux_check_passwd_access (3) - query the SELinux policy database in the kernel smbpasswd (5) - The Samba encrypted password file SSL_CTX_set_default_passwd_cb (3ssl) - set passwd callback for encrypted PEM file h... SSL_CTX_set_default_passwd_cb_userdata (3ssl) - set passwd callback for encrypted P... userpasswd (1) - A graphical tool to allow users to change their passwords. vncpasswd (1) - change the VNC password
Can not find any man pages?
Some RHEL8 installs exclude man pages to install with the smallest footprint possible. If you find that you do not have any man pages installed then simply install them using.
# sudo yum install man-pages man-db man
Can not find your Man pages after installation?
If your RHEL8 was installed via the anaconda kickstart and you do not find your man documentation is installed then look inside the
/root/anaconda-ks.cfg file for the following line:
Simply remove the
--excludedocs flag from the original file and install the OS.
Using a kickstart file with the --excludedocs option prevents RPM documentation from being installed during the RHEL8 OS install.
# rpm -Vv openssh-clients | grep man ......... d /usr/share/man/man1/scp.1.gz (not installed) ......... d /usr/share/man/man1/sftp.1.gz (not installed) ......... d /usr/share/man/man1/ssh-add.1.gz (not installed) ......... d /usr/share/man/man1/ssh-agent.1.gz (not installed) ......... d /usr/share/man/man1/ssh-copy-id.1.gz (not installed) ......... d /usr/share/man/man1/ssh-keyscan.1.gz (not installed) ......... d /usr/share/man/man1/ssh.1.gz (not installed) ......... d /usr/share/man/man5/ssh_config.5.gz (not installed) ......... d /usr/share/man/man8/ssh-pkcs11-helper.8.gz (not installed)
Did you find this article valuable?
Support Dallas Spohn by becoming a sponsor. Any amount is appreciated!