1.19 Read, and use system documentation

The man pages

man pages is abbreviation for "manual pages" - are the form of documentation that is available on almost all UNIX-like operating systems, including Linux. The command used to display them is man.

When you know the exact command to be used, you can use the man page for that command as:

# man ls

To find a command using a keyword use optoin -k:

# man -k chmod
chmod (1)            - change file mode bits
chmod (1p)           - change the file modes
chmod (2)            - change permissions of a file
chmod (3p)           - change mode of a file
fchmod (2)           - change permissions of a file
fchmod (3p)          - change mode of a file
fchmodat (2)         - change permissions of a file relative to a directory file descriptor

The manual Sections are traditionally defined as follows:

1User Commands
2System calls
3Library calls
4Special files (devices)
5File formats and conventions
7Overview, conventions, and miscellaneous
8System management commands

Each manual page has a short description available within it. whatis command searches the manual page names and displays the manual page descriptions of any name matched.

To find some specific page you can use some simple option with whatis command

  • -w interpret string as a pattern containing shell style wildcards.
  • -r interpret string as a regular expression.
# whatis -w systemd.tim*
systemd.time (7)     - Time and date specifications
systemd.timer (5)    - Timer unit configuration
# whatis -r '^sysctl'
sysctl (2)           - read/write system parameters
sysctl (8)           - configure kernel parameters at runtime
sysctl.conf (5)      - sysctl preload/configuration file
sysctl.d (5)         - Configure kernel parameters at boot

Another way to find man pages use command whereis

# whereis chmod
chmod: /usr/bin/chmod /usr/share/man/man1/chmod.1.gz /usr/share/man/man1p/chmod.1p.gz /usr/share/man/man2/chmod.2.gz /usr/share/man/man3p/chmod.3p.gz

The info command

Another command info is similar to man, with a more robust structure for linking pages together. Info pages are made using the texinfo tools, and can link with other pages, create menus and ease navigation in general. The default location of info documentation is /usr/share/info.

# info gzip

To search across info pages use option -k

# info -k gzip
"(tar)gzip" -- gzip
"(tar)Option Summary" -- gzip, summary
"(tar)gzip" -- ungzip
"(tar)Option Summary" -- ungzip, summary
"(tar)Option Summary" -- ungzip, summary <1>
"(tar)gzip" -- gzip

The packages documentation

The /usr/share/doc directory stores documentation(release notes, installation guide etc.) for all packages under respective directories by the name of package.

# ls -l /usr/share/doc/gzip-1.5/
total 96
-rw-r--r--. 1 root root    98 Aug 18  2009 AUTHORS
-rw-r--r--. 1 root root 44706 Jun 18  2012 ChangeLog
-rw-r--r--. 1 root root 18123 Jun 18  2012 NEWS
-rw-r--r--. 1 root root  6854 Jan  1  2012 README
-rw-r--r--. 1 root root 13262 Apr  6  2010 THANKS
-rw-r--r--. 1 root root  3684 Jan  1  2012 TODO

CentOS 7

No features.

openSUSE Leap 42.3

No features.

Ubuntu 17.04

No features.

Publication/Release Date: Jul 19, 2017