Understanding GNU info command in Linux

Introducing GNU info

Man pages have a format useful as a command reference, but less useful as general documentation. For such documents, the GNU Project developed a different online documentation system, known as GNU Info. Info documents are an important resource on a Red Hat Enterprise Linux system because many fundamental components and utilities, such as the coreutils package and glibc standard libraries, are either developed by the GNU Project or utilize the Info document system.

Reading Info Documentation

To launch the Info document viewer, use the pinfo command. pinfo opens in the top directory.

linux info command

Info documentation is comprehensive and hyperlinked. It is possible to output info pages to multiple formats. By contrast, man pages are optimized for printed output. The Info format is more flexible than man pages, allowing a thorough discussion of complex commands and concepts. Like man pages, Info nodes are read from the command line, using the pinfo command.

A typical man page has a small amount of content focusing on one particular topic, command, tool, or file. The Info documentation is a comprehensive document. Info provides the following improvements:

  • One single document for a large system containing all the necessary information for that system
  • Hyperlinks
  • A complete browsable document index
  • A full text search of the entire document

Some commands and utilities have both man pages and info documentation; usually, the Info documentation is more in depth. Compare the differences in tar documentation using man and pinfo:

[user@host ~]$ man tar
[user@host ~]$ pinfo tar

The pinfo reader is more advanced than the original info command. To browse a specific topic, use the pinfo topic command. The pinfo command without an argument opens the top directory. New documentation becomes available in pinfo when their software packages are installed.

Comparing GNU info and man page navigation

The pinfo command and the man command use slightly different navigational keystrokes. The following table compares the navigational keystrokes for both commands:

Scroll forward (down) one screen PageDown or Space PageDown or Space
Scroll backward (up) one screen PageUp or b PageUp or b
Display the directory of topics D -
Scroll forward (down) one half-screen - D
Display the parent node of a topic U -
Display the top (up) of a topic HOME G
Scroll backward (up) one half-screen - U
Scroll forward (down) to next hyperlink DownArrow -
Open topic at cursor location Enter -
Scroll forward (down) one line - DownArrow or Enter
Scroll backward (up) to previous hyperlink UpArrow -
Scroll backward (up) one line - UpArrow
Search for a pattern /string /string
Display next node (chapter) in topic N -
Repeat previous search forward (down) / then Enter n
Display previous node (chapter) in topic P -
Repeat previous search backward (up) - ShiftN
Quit the program Q Q