Using GNU Texinfo and Info on Linux

Problem

You are having trouble accessing documentation because much of the documentation for GNU tools on Linux are in Texinfo documents, the traditional manpages are just a stub, and the default info program is user-hostile (and you don’t feel like learning yet another single-use program).

Solution

Pipe the info command into a useful pager, such as less.

$ info bash | less

Discussion

info is basically a stand-alone version of the Emacs info reader, so if you are an Emacs fan, maybe it will make sense to you. However, piping it into less is a quick and simple way to view the documentation using a tool with which you’re already familiar.

The idea behind Texinfo is good: generate various output formats from a single source. It’s not new, since many other mark-up languages exist to do the same thing; we even talk about one in Embedding Documentation in Shell Scripts. But if that’s the case, why isn’t there a TeX to man output filter? Perhaps because manpages follow a standard, structured, and time-tested format while Texinfo is more free form.

There are other Texinfo viewers and converters if you don’t like info, such as pinfo, info2www, tkman, and even info2man (which cheats and converts to POD and then to manpage format).

Get bash Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.