Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
2  
texinfo file can do a lot more the groff macros. –  jordanm May 29 '13 at 14:45
9  
It's got one advantage over man pages: "hyperlinks". The rest are disadvantes, starting with Not Invented Here Syndrom, funny key bindings, hassle of dir maintenance and many more. –  Jens May 29 '13 at 21:59
    
Use info --vi-keys to make info's keybindings feel more familiar. You can also use less with info to make it feel just like man: info --subnodes -o - $1 | less. You do lose some text formatting this way though. –  paraxor Jun 15 '13 at 11:12
    
Alternatively, point your browser at gnu.org/manual. (Using Vimperator/Vrome is optional.) –  nwk Mar 9 at 21:21

4 Answers 4

up vote 26 down vote accepted

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:

  1. The ability to have a single document for a large system, which contains all the information about that system. (versus 174 man pages)
  2. Ability to do full-text search across the entire document (v. man -k which only checks keywords)
  3. 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)
  4. 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)
  5. 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.

share|improve this answer
3  
man -K foo, with uppercase option, does a global full text search. Try man -K global-apropos - it finds the pages for man itself, in english, and in local language. –  Volker Siegel Jul 25 at 16:43

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.

share|improve this answer

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 hypertexted, 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.

share|improve this answer
1  
+1 especially for the note about hypertext, which I think was a major reason to want to move away from the (then more than now) hardcopy-oriented man format. –  tripleee May 29 '13 at 16:49

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.

If an 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;

Compare ls --help and man ls to see that the difference is only in formating.


The default info viewer is info.
There are more comfortable alternatives, like for the terminal pinfo, of for the GUI konqueror:

pinfo ls

konqueror info:ls

share|improve this answer
    
Well, you are thrifty, I'll give you that. –  mikeserv Jul 29 at 4:36
    
@mikeserv I did not find the sub-answer include feature. ;) –  Volker Siegel Jul 29 at 12:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.