info

system managementlinux
The info command is one of the most frequently used commands in Linux/Unix-like operating systems. info The info command provides access to the GNU Info system, which offers comprehensive hypertext documentation for many GNU utilities and programs. Unlike man pages, which typically offer concise reference material, Info documents are more extensive, structured hierarchically, and include hyperlinks for easier navigation between topics.

Quick Reference

Command Name:

info

Category:

system management

Platform:

linux

Basic Usage:

info [options] [arguments]

Common Use Cases

  • 1

    Info documentation

    Display Info documentation for installed software

  • 2

    Detailed guides

    Access comprehensive guides and tutorials

  • 3

    Learning

    Learn about advanced topics and concepts

  • 4

    Navigation

    Navigate through documentation using hyperlinks

Syntax

info [OPTION]... [MENU-ITEM...]

Options

Option Description
-a, --all Use all matching manuals
-k, --apropos=STRING Look up STRING in all indices of all manuals
-d, --directory=DIR Add DIR to INFOPATH
-f, --file=MANUAL Specify Info manual to visit
-h, --help Display help information and exit
--index-search=STRING Go to node pointed by index entry STRING
-n, --node=NODENAME Specify nodes in first visited Info file
-o, --output=FILE Output selected nodes to FILE
-O, --show-options, --usage Go to command-line options node
--subnodes Recursively output menu items
--vi-keys Use vi-like key bindings
--version Display version information and exit
-w, --where, --location Print physical location of Info file

Examples

How to Use These Examples

The examples below show common ways to use the info command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.

#

Basic Examples:

info ls

Display the Info documentation for the ls command. Unlike a man page, the Info documentation often provides more detailed explanations, examples, and a navigable structure.

info

Open the top-level Info menu that lists all available Info documents. This is the entry point to browse all available documentation in the Info system.

info info

Display documentation about the Info system itself, including how to navigate and use Info documents effectively. This is helpful for users new to the Info documentation system.

info --index-search="wildcards" bash

Search for the term "wildcards" in the Bash info document and jump directly to that section. This is useful for finding specific information within large documents.

Advanced Examples:

info --subnodes -o bash.txt bash

Output the entire Bash Info document, including all sub-nodes, to the file bash.txt. This creates a complete plain text version of the documentation for offline reading or processing.

info -f ./custom-info-file.info

Read and display a custom Info file instead of searching in the standard Info directories. This is useful for viewing locally created or non-standard Info documentation.

info emacs -n "Basic"

Open the Emacs Info documentation directly at the "Basic" node. This allows you to jump directly to a specific section without navigating through the menu structure.

info --vi-keys bash

Use vi-style key bindings for navigation instead of the default Emacs-like bindings. This is helpful for users who are more familiar with vi/vim editor commands.

info --show-options make

Display command-line options for the 'make' program. This example quickly shows all available options for the specified program without having to navigate through the documentation.

Try It Yourself

Practice makes perfect! The best way to learn is by trying these examples on your own system with real files.

Understanding Syntax

Pay attention to the syntax coloring: commands, options, and file paths are highlighted differently.

Notes

Navigating Info Documents:

  • Space: Scroll forward one page
  • Backspace/Delete: Scroll backward one page
  • Tab: Move to the next hyperlink
  • Enter: Follow the hyperlink at cursor
  • n: Move to the next node
  • p: Move to the previous node
  • u: Move up one level in the hierarchy
  • t: Go to the top node of the current document
  • d: Go to the directory (top level) node
  • l: Go back to the last node visited
  • s or /: Search forward for text
  • ?: Search backward for text
  • q: Quit Info
  • h: Display help information

Info vs Man Pages:

  • Info documents are more comprehensive than man pages
  • Info uses a hierarchical structure with hyperlinks between sections
  • Info supports more complex navigation and searching capabilities
  • Info is the primary documentation format for GNU software
  • Man pages typically offer more concise reference information
  • Info documents often include tutorials and conceptual explanations

How Info Works:

  • Info documents are written in Texinfo source format (.texi files)
  • Documents are processed with makeinfo to create .info files
  • The info program reads these files and provides an interactive viewer
  • Info files are typically stored in /usr/share/info
  • The INFOPATH environment variable can specify additional search locations
  • Info documents can be exported to various formats including HTML, PDF, and plain text

Common Use Cases:

  • Learning how to use complex GNU tools in detail
  • Exploring documentation with a structured approach
  • Finding comprehensive explanations of concepts and features
  • Following tutorial-style documentation for GNU software
  • Creating and viewing custom documentation in the Info format

Useful Environment Variables:

  • INFOPATH: Specifies directories where Info looks for documentation
  • INFO_PRINT_COMMAND: Command used to print Info documents
  • PAGER: The program used to display text

Related Commands and Tools:

  • man - The traditional Unix manual page viewer
  • pinfo - An alternative Info browser with better color support
  • makeinfo - Convert Texinfo source to Info format
  • texinfo - A documentation system for creating Info documents
  • texi2html - Convert Texinfo documents to HTML
  • texi2pdf - Convert Texinfo documents to PDF
  • infokey - Compile customized key bindings for Info

Tips & Tricks

1

Use the -n node option to start at a specific node

2

Use the -k keyword option to search for keywords

3

Use the -d dir option to specify the directory containing the Info files

4

Use the -h option to display help

5

Use the -v option to display version information

Common Use Cases

Info documentation

Display Info documentation for installed software

Detailed guides

Access comprehensive guides and tutorials

Learning

Learn about advanced topics and concepts

Navigation

Navigate through documentation using hyperlinks

Customization

Customize Info documentation for personal use

Related Commands

These commands are frequently used alongside info or serve similar purposes:

Use Cases

1

Info documentation

Display Info documentation for installed software

2

Detailed guides

Access comprehensive guides and tutorials

3

Learning

Learn about advanced topics and concepts

4

Navigation

Navigate through documentation using hyperlinks

5

Customization

Customize Info documentation for personal use

Learn By Doing

The best way to learn Linux commands is by practicing. Try out these examples in your terminal to build muscle memory and understand how the info command works in different scenarios.

$ info
View All Commands