3

I was looking for a way to follow "hyperlinks" in man pages, when I stumbled across the info command, which seemed to display information on commands the same as man but also allows you to tab to hyperlinks (and sadly no vim keybindings, but the arrow keys work)

But it made me wonder if this command was just displaying man pages with different formatting and functionality of display...or if it was displaying something else entirely like a separate set of documentation.

5
  • 3
    Did you try info man and man info ? Apr 24, 2020 at 18:40
  • Yes, and info info and man man only the later produces a result.
    – leeand00
    Apr 24, 2020 at 18:41
  • I guess I'm asking if the documentation in the man info is the same "documentation" that man has.
    – leeand00
    Apr 24, 2020 at 18:43
  • I think the answer is "sometimes" - see for example Does info also look up manpage? Apr 24, 2020 at 18:53
  • 2
    info has a --vi-keys option for (a subset of) vim keybindings.
    – wastl
    Apr 25, 2020 at 16:19

5 Answers 5

9

man and info use different primary sources of information: man displays manpages, typically stored in /usr/share/man, while info displays Info documents, typically stored in /usr/share/info. Additionally, Info documents are normally available in a tree structure, rooted in /usr/share/info/dir, the “Directory node” displayed when you start info.

Whether a given manpage contains the same information as its corresponding Info document depends on who authored both. In some cases, they’re produced from a common source, or one is produced from the other; but in many cases they’re different.

GNU info will display a manpage if it doesn’t find an Info document. Pinfo can also display both Info documents and manpages, and it provides hyperlinks in manpages; its key bindings can also be configured to match your tastes.

7

The info command displays documentation available in Info format. This is a document format that supports basic text formatting (less than modern man), documents consisting of multiple logical pages, and hyperlinks.

Info files are usually generated from texinfo sources, which can be transformed both into Info documentation that's readable in a text terminal, nicer printable text in a format such as PDF, or HTML. The Info format is older than HTML.

The Info format started out as Emacs's documentation format. There's a more fancy Info browser built into Emacs, and info is available for non-Emacs users. The standalone info browser is fairly minimalistic and doesn't have configurable key bindings, and since it comes from GNU it naturally has Emacs-like key bindings. If you want an Info browser with vi-like key bindings, use Emacs and one of its vi emulation packages.

The full documentation of info is part of the texinfo package. Your distribution may package the documentation separately from the executable due to license concerns over GNU documentation; for example, Debian ships it in texinfo-doc-nonfree.

If you run info foo and there's no foo available in the Info documentation, the info utility tries calling man foo, and if that succeeds, info displays the man page rendered by man in info's interface.

3

man and info are different approaches to providing tools' / commands' manuals. For example, from man tar:

NOTE

This manpage is a short description of GNU tar. For a detailed discussion, including examples and usage recommendations, refer to the GNU Tar Manual available in texinfo format. If the info reader and the tar documentation are properly installed on your system, the command

info tar

should give you access to the complete manual.

It may happen, though, that, for certain commands, an info data set doesn't exist, or falls back to the (reduced) contents of the man page.

0

M-x man Return info Return gives you the man page for the info program within the info program.

-1

If you want to be able to view info and man pages with the ability to follow links, colorful display and vim bindings, try info.vim (tips in Is there a more interactive man and info pages viewer?).

Leaving this here as it took myself many months to look in the most obvious place for vim bindings...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .