I understand what GNU Info is and how to use it, but what is it for? Why does it exist in parallel to the man pages? Why not write detailed man pages rather than provide a separate utility?
GNU Info was designed to offer documentation that was comprehensive, hyperlinked, and possible to output to multiple formats.
Man pages were available, and they were great at providing printed output. However, they were designed such that each man page had a reasonably small set of content. A man page might have the discussion on a single C function such as printf(3), or would describe the ls(1) command.
That breaks down when you get into larger systems. How would you fit the documentation for Emacs into man pages? An example of the problem is the Perl man page, which lists 174 separate man pages you can read to get information. How do you browse through that, or do a search to find out what && means?
As an improvement over man pages, Info gave us:
- The ability to have a single document for a large system, which contains all the information about that system. (versus 174 man pages)
- Ability to do full-text search across the entire document (v. man -k which only checks keywords)
- Hyperlinks to different parts of the same or different documents (v. The See Also section, which was made into hyperlinks by some, but not all, man page viewers)
- An index for the document, which could be browsed or you could hit "i" and type in a term and it would search the index and take you to the right place (v. Nothing)
- Linear document browsing across concepts, allowing you read the previous and next sections if you want to, either by mouse or keystroke (v. Nothing).
Is it still relevant? Nowadays most people would say "This documentation doesn't belong in a manpage" and would put it in a PDF or would put it up in HTML. In fact, the help systems on several OSes are based on HTML. However, when GNU Info was created (1986), HTML didn't exist yet. Nowadays texinfo allows you to create PDF, Info, or other formats, so you can use those formats if you want.
That's why GNU Info was invented.
The reason the Info system was invented is necessity, but I guess "laziness, hubris and impatience" is an equally good explanation.
The point of the GNU project was to develop a freely modifiable and freely distributible operating system and tools. The traditional Unix man system was based on the nroff/troff document formatting system from Bell Labs, which was at the time commercial (non-free) software. Eventually that system was reverse engineered and a free replacement called groff was created, but that was several years after the GNU project started. So using the man system for GNU documentation before then would have required implementing a troff replacement, a huge undertaking.
Meanwhile GNU Emacs was the first big project of GNU and it required extensive documentation. Facing a mountain of work implementing the GNU system, Richard Stallman cast about for existing software that he could use in his system. TeX already existed and had powerful document formatting capabilities. Unlike nroff/troff, TeX was free to use and redistribute. Texinfo was created as a documentation system to leverage the power of TeX for printed manuals and GNU Emacs for processing and online documentation reading. The original Texinfo processor and Info document browser were both written in Lisp and ran inside Emacs. The standalone Texinfo utilities came several years later.
As the Wikipedia page says, TeXinfo was designed as the official documentation of the GNU project by Richard Stallman. It is a set of macros on top of TeX, and was designed for writing software manuals. I think Stallman considered man pages inadequate for the task. Two advantages Texinfo has over man pages is that it is hyperlinked, and second, that it is, by design easy to convert into other formats.
ADDENDUM: While not strictly relevant to the question, note that man pages are still considered the standard documentation system on free Unix-like systems like those running atop the Linux kernel and also the various BSD flavors. For example, the Debian package templates encourage the addition of a man page for any commands, and also lintian checks for a man page. Texinfo is still not widely used outside the GNU project.
From a practical view,
info is the most detailed of three levels of reference documentation:
The three levels are usually increasing in detail:
--help as a common command option - a short usage summary,
man - the classic man pages, a quick reference, and
info - a more detailed, GNU-speciffic manual - the full, official documentation.
info page is not available, the man page usually contains the full documentation.
Note that the man page contains exactly the same information like the
--help output for many commands from GNU coreutils - for example
ls --help and
man ls to see that the difference is only in formating.
The default info viewer is
There are more comfortable alternatives, like for the terminal
pinfo, of for the GUI