The other answers here will work, but I have a much simpler alternative:
info foo | less
This command take the output of info
and pipe it through less
, which will make the info page behave similar to a regular manpage. It's not as precise as the other alternatives, but will work in majority of cases.
Output:
stefanl@host:~ $ info vi | less
File: *manpages*, Node: vim, Up: (dir)
VIM(1) VIM(1)
NAME
vim - Vi IMproved, a programmers text editor
SYNOPSIS
vim [options] [file ..]
vim [options] -
vim [options] -t tag
vim [options] -q [errorfile]
...
...
A more precise, but more complicated, version would be:
info ls --subnodes -o - |less
The other answers here require that you remember arcane flags or make modification to your environment every single Linux system that you maintain, which doesn't work well if you have accounts on hundreds of systems. At some point, you're going to be on a system where your custom environment isn't present, and info foo | less
will be very easy to remember.