info command in Linux with Examples
info command reads documentation in the info format. It will give detailed information for a command when compared with the man page. The pages are made using the Texinfo tools which can link with other pages, create menus, and easy navigation.
Here, we will explore the functionality of the info command, its syntax, options, and practical examples to help you understand how to use it effectively.
Syntax
info [OPTION]... [MENU-ITEM...]
where,
- 'OPTIONS': Modify the behavior of the command.
- 'MENU-ITEM': Specify a particular section or node in the documentation to visit.
Key Options for the info command
The info command supports several options that enhance its functionality. Below are the most useful ones:
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 the Info manual to visit. |
-h, --help | Display help and exit. |
-n, --node=NODENAME | Specify nodes in the first visited Info file. |
-o, --output=FILE | Output selected nodes to FILE . |
-O, --show-options, --usage | Go to the command-line options node. |
-v, --variable VAR=VALUE | Assign VALUE to the Info variable VAR . |
--version | Display version information and exit. |
-w, --where, --location | Print the physical location of the Info file. |
info Command In Linux Examples
1.-a:
It use all matching manuals and display them for a particular command.
info -a cvs

2. -k:
It look up STRING in all indices of all manuals and then display the same.
info -k cvs

3. -d:
It adds DIR to INFOPATH and also display the same.
info -d cvs

4. -O:
It go to command-line options node for a particular command and display the same.
info -O cvs

5. -w Command:
It print physical location of Info file.
info -w cvs

Differences Between Man and Info Pages
While both man and info pages are essential documentation tools in Linux, they serve slightly different purposes:
- Man pages are concise and linear, providing a quick reference for commands and their options.
- Info pages are more detailed and structured, offering in-depth explanations, examples, and navigational features through menus and links.
Note:
To check for the manual page of info command, use the following command:
man info
To check the help page of info command, use the following command:
info --help

Conclusion
The info command is a powerful tool that provides a more thorough look into Linux commands and programs than man pages. Its structured approach, with menus and navigation options, allows users to look deeper into the documentation, making it an invaluable resource for Linux users who need to explore commands in greater detail.