Contents|Index|Previous|Next

Command Line Options

GNU info accepts several options to control the initial node being viewed, and to specify which directories to search for info files. The following is a template showing an invocation of GNU info from the shell.

    info [-- option-name option-value] menu-item ...

The following option-names are available when invoking info from the shell.

--directory directory-path
-d directory-path

Adds directory-path to the list of directory paths searched when Info needs to find a file. You may issue --directory multiple times; once for each directory which contains info files.
Alternatively, you may specify a value for the environment variable, INFOPATH; if --directory is not given, the value of INFOPATH is used. The value of INFOPATH is a colon separated list of directory names. If you do not supply INFOPATH or --directory-path, a default path is used.

--file filename
-f filename

Specifies a particular info file to visit. Instead of visiting the file, dir, info will start with (filename) Top as the first file and node.

--node nodename
-n nodename

Specifies a particular node to visit in the initial file loaded. This is especially useful in conjunction with --file. Of course, you can specify both the file and node in a --node command; but dont forget to escape the open and close parentheses from the shell as in: info --node (emacs)Buffers.
You can specify --node multiple times. For an interactive Info session, each nodename is visited in its own window. For a non-interactive Info (such as when --output is given), each node-name is processed sequentially.

--output filename
-o filename

Specify filename as the name of a file to output to. Each node that Info visits will be output to filename instead of interactively viewed. A value of - for filename specifies the standard output.

--subnodes

This option only has meaning given in conjunction with --output. It means to recursively output the nodes appearing in the menus of each node being output. Menu items which resolve to external info files are not output, and neither are menu items which are members of an index. Each node is only output once.

--help
-h

Produces a relatively brief description of the available Info options.

--version

Prints the version information of info and exits.

menu-item

Remaining arguments to info are treated as the names of menu items. The first argument would be a menu item in the initial node visited, while the second argument would be a menu item in the first arguments node. You can easily move to the node of your choice by specifying the menu names which describe the path to that node, as in the following example.

    info emacs buffers

This input example selects the menu item Emacs in the node (dir)Top, and then selects the menu item Buffers in the node (emacs)Top.