How to use the info and pinfo commands in Linux

When you install a software package, it automatically installs help pages that explain the package's functionality and provide a detailed description of how to use it. There are two standard formats for help pages: manual and info. Manual pages contain detailed descriptions, whereas info pages include a summarized version of all features and functions of the package.

Linux offers help, manual, info, and pinfo commands to read help pages. The manual command reads the manual pages. The info and pinfo commands read the info pages. The help command reads both and displays a striped and summarized version of information, including only a brief description of essential command line options. This tutorial explains how to use the info and pinfo commands to read info pages. You can check other parts of this tutorial series to learn about the help and manual commands.

This tutorial is part of the tutorial series 'Getting help on the command prompt on Linux'. Other parts of this series are the following.

Chapter 01  How to Use the help Command in Linux
Chapter 02  How to Use the man command in Linux
Chapter 03  How to use the info and pinfo commands in Linux

Most packages prepare their help pages as manual pages. Only a few packages prepare their help pages as info pages. However, info pages provide more extensive information than corresponding manual pages. The following command shows a list of all info pages.

#ls /usr/share/info | column

listing texinfo pages

Nodes in info pages

Info pages organize information into sections. These sections are known as nodes. A node describes a particular subject of an info page. Since a node contains information only about a specific topic, you can use nodes to find and view the required information quickly and efficiently.

Viewing or reading info pages

You can use the info or the pinfo command to view the info pages of a package. Both the info and pinfo commands format and display the info page differently. The info command formats the page in plain text format, while the pinfo command formats it in standard web format.

Syntax of the info command

To use the info command, use the following syntax.

#info [command/package]

For example, the following info command displays info pages of the bash shell.

#info bash

the output of the info command

Syntax of the pinfo command

To use the pinfo command, use the following syntax.

#pinfo [command/package]

For example, the following pinfo command displays info pages of the bash shell.

#pinfo bash

the output of the pinfo command

Header information

The first line at the top of the screen in the output of both commands is known as the header. A header shows the names of the info page and current, following, and previous nodes.

the header section in the output of info and pinfo commands

Navigating through output

The output may contain many pages. By default, both commands only display the first page. To view the remaining pages, you have to navigate the output.

The following table lists navigation keys for the info command.

Key Action
Down arrow To move to the following line
Up arrow To move to the previous line
Spacebar To move to the next page
Del To move to the previous page
] To move to the next node
[ To move to the previous node
t To move to the top node of the document
s To search a string in the forward direction
{ To search the last occurrence of the string
} To search for the next occurrence of the string
q To quit from the document

The following table lists navigation keys for the pinfo command.

Key Action
Down arrow To move to the following line
Up arrow To move to the previous line
Spacebar To move to the next page
Del To move to the previous page
n To move to the next node
p To move to the previous node
s To search a string in the forward direction
q To quit from the document

Viewing manual pages from the info or pinfo command

If you use the info or pinfo command to view manual pages, the output contains no information about nodes. Manual pages organize information in sections, but neither command recognizes sections. To verify this, let's view the manual page of the passwd command from the info and pinfo commands.

#info passwd
#pinfo passwd

viewing manual pages from info and pinfo commands

Since manual pages do not organize information in nodes, the keys to navigate through the output do not work if you use the info or pinfo commands to view manual pages. Because of this, it is better to use the manual command to view the manual pages and info or pinfo command to view the info pages.

Conclusion

The info and pinfo commands display info pages of the specified package or command. Both commands provide an extensive overview of a package's features and functionality. Understanding how to navigate and utilize these commands effectively can enhance your ability to find critical information quickly.

ComputerNetworkingNotes Linux Tutorials How to use the info and pinfo commands in Linux

We do not accept any kind of Guest Post. Except Guest post submission, for any other query (such as adverting opportunity, product advertisement, feedback, suggestion, error reporting and technical issue) or simply just say to hello mail us ComputerNetworkingNotes@gmail.com