pinfo: Read Linux Info Documentation in Colors

last updated in Categories Command Line Hacks

You can display man pages in colors. Similarly, you can display info pages in colors. The info command is used under Linux or Unix to read multipage documentation and act as help viewer working on a command line interface, useful when there is no GUI available on the server. The info command processes info files. All info files are are in Texinfo format. You get the documentation tree. pinfo is a little known tool that can display info pages in colors.


Install pinfo

Type the following apt-get command to install the pinfo under Debian / Ubuntu Linux, enter:
# apt-get install pinfo
Sample outputs:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 12 not upgraded.
Need to get 90.0 kB of archives.
After this operation, 381 kB of additional disk space will be used.
Get:1 squeeze/main pinfo amd64 0.6.9-5 [90.0 kB]
Fetched 90.0 kB in 1s (58.7 kB/s)                     
Selecting previously deselected package pinfo.
(Reading database ... 255859 files and directories currently installed.)
Unpacking pinfo (from .../pinfo_0.6.9-5_amd64.deb) ...

FreeBSD unix user can use the port as follows install the same:
# cd /usr/ports/misc/pinfo/ && make install clean

How do I use pinfo command?

The syntax is as follows:

pinfo page
pinfo command

To read bash info page, enter:
$ info bash
Sample outputs:

Fig.01 – Linux info command read online documentation

To read bash info page using pinfo viewer, enter:
$ pinfo bash
Sample outputs:

Linux pinfo: curses based colorful lynx-style info browser
Fig.02: pinfo in action

To create the alias use the following syntax and add alias to your ~/.bashrc file :

alias info='pinfo'

You can use the following keys to move between various pages:

  1. n goes to the next page.
  2. p goes to the previous page.
  3. u goes to the upper page.
  4. To follow a cross reference, the cursor can be moved over a link (a word preceded by a *) and enter pressed.
  5. q exit pinfo.

pinfo has many options, see man page for more information:
$ man pinfo
$ pinfo pinfo


Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.