info Command in Linux VPS

info Command in Linux VPS

The info command in Linux VPS is a powerful Unix tool for accessing detailed information about various topics, especially documentation for system commands, libraries, and GNU utilities.

Thanks to Texinfo, Linux users can easily navigate linked menus and sections, making complex topics a breeze.

The info command in Linux Ubuntu, Debian, and CentOS offers more detailed explanations than the man page and a user-friendly interface.

Here is the basic syntax of info command in Linux:

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

Here’s a breakdown of its syntax:

[OPTION]: Optional flags that customize how info behaves.

[MENU-ITEM...]: Specific nodes or sections within the info documentation you want to view directly.

This is useful for navigating to a particular topic within a larger documentation set.

Prerequisites to Use info Command in Linux VPS

Provide the options below to let this tutorial work correctly and move on.

  • A Linux VPS running a compatible Linux distribution (e.g., Ubuntu, Debian, CentOS).
  • A non-root user with sudo privileges.

How to use Linux info Command?

Info command Linux is a hypertext documentation system that is mainly utilized on operating systems that resemble Unix.

Many Linux distributions allow customizing the default location of info files. You can adjust this using environment variables or configuration files.

The below commands help you how to use the info command in Linux Ubuntu, Debian, and CentOS.

  • To start using the info command, open your terminal and run the following command:
info

It will read the top-level directory menu.

  • To check for the manual page of the info command, run:
man info
  • To find a detailed list and read the recent menu item, run:
info info

The general handbook for the Info readers is displayed when the command is executed.

  • To view the second menu item contained in the first menu, type:
info info emacs
  • Run the command below to get help on available options:
-h

OR

--help

To check the help page of the info command, type:

info --help
  • Running the commands below helps in searching for a keyword in all info documentation. Here is the info command search:
-k

OR

--apropos
  • To access the documentation for the ls command, you can simply type:
info ls

This will display the main info page for the ls command.

You can then use the navigation keys (like n for the next page, u to move up a level) to explore different sections or follow links to related topics.

Note: to exit the info session, press q and return to the terminal prompt.

Practical Example of Linux info Command

Let’s go through this guide and review the most common usages of info command in Linux VPS on any of Linux distributions with examples.

Here, we use ls command to show these examples:

1. View All Available Matching Manuals

Using the info command with the -a option displays all matching manuals for a particular command.

To view all matching manuals for the ls command, run:

info -a ls

info command for specific command displays all matched manuals for “ls” and uses them.

2. View STRING in Index of All Manuals

Using the info command with the -k option displays STRING in all indices of all the manuals.

To search for the ls command within the index entries of all manuals, run:

info -k ls

It presents any manual entries pertinent to “ls.”

3. View Directory in INFOPATH

Using the info command with the -d option includes Directory in INFOPATH:

info -d ls

This command updates INFOPATH with the dir and displays the same on your terminal.

4. View Command-Line Options

Using the info command with the -O option displays the command-line options node.

Run the command below to view the command-line option for the ”ls” command:

info -O ls

5. View File Locations

Using the info command with the -w option, prints the physical file location of an Info file.

To list the file location of the ”ls” command, type:

info -w ls

The given commands’ physical file location appears on the screen.

6. View Version Information

Using the info command with the --version option displays the version information of a file and exits the command simultaneously.

Run the following command to view the version information of the ”ls” command:

info --version ls

7. View Info pages menu output

To navigate Info Pages like man pages in Linux, use the info menu items recursively to browse the Info pages menu similarly to Man pages, and pipe the output contents to the less command.

The Info pages can be navigated similarly to the man command pages, except they contain comprehensive details and internal cross-reference links.

This gives the Info pages’ readers a comprehensive reading experience:

info --subnodes -o - ls | less

info command navigate displays your Info pages menu output like the Man pages.

That’s it! You reviewed all you need to know about Linux info command options.

info Command vs man Command

Here is the best answer for info vs man command Linux.

Linux offers two main tools for command documentation: man and info.

For a quick refresher on a command’s syntax, man provides concise, single-page summaries. If you need a deeper dive, info is your friend.

It presents information in a user-friendly, hierarchical structure with linked menus and sections, allowing for detailed explanations and exploration of complex topics.

What are info command advantages over man?

  1. More user-friendly interface for browsing information.
  2. Can display helpful menus and links for navigating related topics.
  3. Often provides more in-depth explanations compared to man pages.

How to access info for a specific command?

To do this, simply type info followed by the command name.

For example, info ls for the ls command.

How to navigate within an info page?

Use keyboard shortcuts like:

  • n for next page.
  • p for previous page.
  • u to move up a level.
  • l: Return to the last visited page.
  • Arrow keys to move around the current page.

Why the info page for a command doesn’t exist?

The documentation might not be available in the Info format. Try using man instead.

Why I can’t find the info I need on the page?

Use the navigation keys to explore further, or search for keywords using ?.

You can also consult the man page for info (man info) for advanced search options.

Conclusion

Using the above examples, you know how to use the info command in Linux VPS to effectively navigate and organize vast volumes of documentation, giving users access to comprehensive details on different commands, applications, and ideas.

Also, consider that the default Linux info command keybindings might feel odd, especially for Vim users.

However, it is possible to switch to Vim-like navigation with info --vi-keys. Finally, press h inside “info” for a quick keybinding reference.

Leave a Reply

Your email address will not be published. Required fields are marked.