Understanding a Program's Info Entry in Linux and How to Use the `info` Command
Introduction
In the Linux ecosystem, understanding how to effectively navigate and use
documentation is crucial. While man
pages are often the go-to for quick
reference, the info
utility offers a more detailed and organized view of
documentation. In this article, we'll explore what an info
entry is, how to
navigate it, and the different ways the info
command can be used.
What is an Info Entry?
The GNU Info system was developed to provide detailed, structured documentation
for programs, functions, and libraries. It serves as a supplement, or in some
cases, a replacement, for traditional man
(manual) pages. Info entries are
usually more extensive than man
pages and are structured as hyperlinked
documents that can be easily navigated, much like web pages.
Info entries are stored in the .info
format and are commonly found
in /usr/share/info/
or /usr/local/share/info/
.
How to Use the info
Command
To launch the info
browser and start reading the documentation for a
particular command, library, or program, you can simply type:
info [topic]
where [topic]
is the name of the program, command, or library you want to
learn about.
Navigation Keys
Space
: Scroll downDelete
orBackspace
: Scroll upn
: Next nodep
: Previous nodeu
: Up one levelq
: Quit info browser
Examples
Viewing General Info Directory
info
This command opens the top-level directory of all available Info documentation.
Viewing Info Entry for a Specific Command (e.g., ls
)
info ls
This command opens the Info entry for the ls
command, displaying detailed
information on its usage, options, and examples.
Searching for Commands Containing a Keyword
info --apropos=keyword
This searches for all info entries that have keyword
in their metadata or
content and displays a list of matches.
Viewing a Specific Section of an Entry
info 'ls#OPTIONS'
This command jumps directly to the "OPTIONS" section of the ls
info page.
View Info Entry as Plain Text
info --subnodes -o out.txt ls
This saves the Info entry for ls
, including all its subnodes, to out.txt
in
plain text format.
Table of info
Commands
Command | Detailed Explanation |
---|---|
info | Opens the top-level Info directory |
info [topic] | Opens the Info page for the specified topic |
info --apropos=keyword | Searches for Info entries containing keyword |
info -k keyword | Alias for --apropos , searches for keyword |
info --subnodes | Includes all subnodes when displaying an entry |
info --output=file | Redirects output to a file |
info --where | Prints the location of the Info file for a topic |
info --vi-keys | Enables vi-like key bindings |
man vs info
Feature | info Command | man Pages |
---|---|---|
Structure | Hyperlinked, tree-like structure | Linear, scrollable text |
Navigation | Navigate through hyperlinks and nodes | Scroll up and down |
Detail Level | Usually more detailed, covers the topic exhaustively | Tends to be concise, providing essential information |
Interactivity | More interactive, resembling a basic web browser | Mostly static text, less interactive |
Search Functionality | Can search within the document and navigate to specific nodes | Can search within the page, but lacks hyperlinking |
Examples | Often contains examples, especially for complex commands | May contain examples, but usually fewer and less detailed |
File Format | Stored in .info files | Stored in .gz files (compressed groff text) |
File Location | Usually in /usr/share/info/ or /usr/local/share/info/ | Usually in /usr/share/man/ |
Multimedia Elements | May contain menus and ASCII art | Generally plain text, lacking multimedia elements |
Command Options | Various options like --apropos , --subnodes , --output , etc | Fewer options, primarily focuses on displaying the manual page |
User Experience | Designed for in-depth reading and learning | Suitable for quick look-ups and command synopsis |
History | Developed by the GNU Project as an enhancement to man | Traditional Unix documentation system |
Conclusion
The info
command provides a structured, detailed, and navigable way to access
documentation on Linux systems. Whether you're a beginner looking for guided
explanations or an experienced user in need of a quick reference, info
is an
invaluable tool. Familiarizing yourself with info
entries and commands can
greatly enhance your proficiency in Linux.
What Can You DO Next 🙏😊
If you liked the article, consider subscribing to Cloudaffle, my YouTube Channel, where I keep posting in-depth tutorials and all edutainment stuff for software developers.