
pinfo Command in Linux
The pinfo command in Linux is a curses-based, Lynx-style browser for navigating info files and man pages. It is a more user-friendly command to view the info page than the info tool.
On execution, the pinfo searches for info pages in directories like /usr/share/info and /usr/local/share/info. If no relevant info page is found, it returns the man page.
Table of Contents
Here is a comprehensive guide to the options available with the pinfo command −
- Installation of pinfo Command
- Syntax of pinfo Command
- pinfo Command Options
- Examples of pinfo Command in Linux
Installation of pinfo Command
By default, the pinfo command may not be available on Linux. To install it on Ubuntu, Kali Linux, Raspberry Pi OS, Debian, and Debian-based distributions, use the following command −
sudo apt install pinfo
To install it on CentOS, use the command given below −
sudo yum install pinfo
For CentOS, enabling EPEL (Extra Packages for Enterprise Linux) is required.
To install pinfo on Fedora, use the command given below −
sudo dnf install pinfo
To verify the installation, check the pinfo version −
pinfo --version

Syntax of pinfo Command
The syntax of the pinfo command is as follows −
pinfo [options] [infopage]
In the above syntax, the [options] field is used to specify options such as displaying usage help, version, and others. The [infopage] field is used to specify the info page name.
pinfo Command Options
The options of the pinfo command are listed below −
Flags | Options | Description |
---|---|---|
-h | --help | Print help information and exit. |
-v | --version | Print version information and exit. |
-m | --manual | Use manual pages instead of info by default. Options after -m are passed directly to the man program. |
-r | --raw-filename | Use the specified infopage as a raw filename. |
-f | --file | Synonym for -r. |
-a | --apropos | Call apropos when no info or man page is found. |
-c | --cut-man-headers | Remove repeated headers in parsed man pages. Use with caution. |
-s | --squeeze-lines | Remove extra empty lines in manual pages. |
-t | --force-manual-tag-table | Force manual detection of corrupted tag tables in info files. |
--node=nodename | Navigate to the specified node in an info file. | |
--rcfile=filename | Use an alternate configuration file. | |
-l | --long-manual-links | Use long link names in manuals for systems with subsectioned manual hierarchy. |
-x | --clear-at-exit | Clear the screen upon exit. |
Examples of pinfo Command in Linux
In this section, the usage of the pinfo command in Linux will be discussed with examples −
Displaying an info Page
To open an info page, use the pinfo command with the info page name. For example, to display the info page of echo, use the following command −
pinfo echo

Displaying the man Page instead of the info Page
To switch the info page to the man page, use the -m or --manual option −
pinfo -m echo

Displaying a Specific Node
To display a specific node of an info page, use the --node option with the node name. For example, to display the Introduction section of Coreutils, use the pinfo command in the following way −
pinfo --node=Introduction Coreutils

Other common nodes are top, usage, options, bugs, examples, or credits.
Displaying an info Page using its Raw Path
To display an info page, using its raw path, use the -r or --raw-filename option −
pinfo -r /usr/share/info/coreutils.info.gz

The -r or --raw-filename option in pinfo treats the provided argument as a direct file path rather than searching for the specified name in the usual directories. This is useful for opening an info file located in a non-standard location or with an uncommon name.
Calling Apropos when No info Page is Found
To call apropos automatically, when no info page is found, use the -a or --apropos option −
pinfo -a noinfopage
The apropos command in Linux is used to search for commands or topics in the system's manual pages (man pages) based on a keyword or phrase.
Clearing Screen on info Page Exit
To clear the terminal screen on the exit of the info page, use the -x or --clear-at-exit option −
pinfo -x tar
Displaying Usage Help
To display the usage help of the pinfo command, use the -h or --help option −
pinfo -h
Conclusion
The pinfo command in Linux provides an easier way to navigate and view info pages and man pages through a curses-based interface. It searches for info pages in standard directories and falls back to man pages when needed.
The pinfo command offers various options like displaying help, showing the version, switching between info and man pages, and navigating to specific nodes within the info page. Additionally, it can clear the screen upon exit or call apropos when no relevant page is found.