info Command

The info command reads GNU Info documents, which provide hypertext documentation for GNU software and other programs. Info documents offer more structured and cross-referenced documentation than traditional man pages.

Syntax

info [OPTIONS] [MENU-ITEM...]

Description

The info command is a hypertext documentation reader that displays GNU Info documents. These documents are organized as a hierarchy of nodes with cross-references and links, making it easy to navigate complex documentation.

Key features:

  • Hypertext navigation with cross-references
  • Hierarchical document structure
  • Search capabilities within documents
  • Index-based topic lookup
  • More detailed than man pages for GNU software

Common Options

Option Description
--apropos=STRING Look up STRING in all indices of all manuals
-d, --directory=DIR Add DIR to INFOPATH
-f, --file=FILENAME Specify Info file to visit
-h, --help Display help and exit
-n, --node=NODENAME Specify nodes in first visited Info file
-o, --output=FILENAME Output selected nodes to FILENAME
-R, --raw-escapes Output "raw" ANSI escapes
--usage Display brief usage message
-v, --version Display version information
-w, --where Print physical location of Info file

Examples

Open main info directory

info

Opens the main info directory with available documentation

Read specific program documentation

info bash

Opens the Bash shell documentation

Read GNU Coreutils documentation

info coreutils

Opens documentation for GNU core utilities

Read GCC documentation

info gcc

Opens the GNU Compiler Collection documentation

Open specific node

info bash "Bash Features"

Opens the Bash documentation at the "Bash Features" node

Search all manuals

info --apropos=printf

Searches for "printf" in all available info manuals

Find info file location

info --where bash

Shows the physical location of the bash info file

Open specific info file

info -f /usr/share/info/bash.info

Opens a specific info file by path

Output to file

info bash -o bash_manual.txt

Outputs the bash manual to a text file

Add directory to search path

info -d /usr/local/share/info emacs

Adds a directory to the info search path

Navigation Commands

While reading info documents, use these keyboard commands:

Key Action
q Quit info
h Show help tutorial
? Show list of commands
Space Scroll forward one screen
Backspace Scroll backward one screen
n Go to next node
p Go to previous node
u Go up one level
t Go to top node
d Go to directory node
Tab Jump to next hyperlink
Enter Follow hyperlink
l Go back to last node
s Search forward
Ctrl+s Incremental search
i Search index
m Go to menu item
g Go to node by name

Understanding Info Document Structure

Info documents are organized hierarchically:

  • Directory - Top-level menu of all available manuals
  • File - A complete manual for a program or topic
  • Node - A section within a file, like a chapter or section
  • Menu - List of subnodes within a node
  • Cross-references - Links to related nodes

Navigation hierarchy

Directory (d) ├── Manual 1 (file) │ ├── Node 1.1 │ ├── Node 1.2 │ └── Node 1.3 └── Manual 2 (file) ├── Node 2.1 └── Node 2.2

Common Info Documents

Command Description
info bash Bash shell documentation
info coreutils GNU core utilities (ls, cp, mv, etc.)
info gcc GNU Compiler Collection
info emacs Emacs editor documentation
info gawk GNU AWK programming language
info sed Stream editor documentation
info grep Pattern searching utility
info tar Archive utility documentation

Common Use Cases

When to Use info
  • GNU Software - Comprehensive documentation for GNU tools
  • Programming - Detailed language and compiler documentation
  • System Administration - In-depth utility documentation
  • Learning - Tutorial-style documentation with examples
  • Reference - Cross-referenced technical documentation

Info vs Man Pages

Feature Info Man Pages
Structure Hierarchical with cross-references Linear, single document
Navigation Hypertext links and menus Sequential scrolling
Content Comprehensive tutorials and examples Concise reference format
Search Index-based and text search Text search within page
Best for Learning and detailed reference Quick reference and syntax

See also