Most people who use Linux pretty quickly learn about
man pages, and how to navigate them with their preferred pager (usually
less these days).
Less well known are the
info pages. If you’ve never come across them, these look like
man pages, and contain similar information, but are invoked like this:
Over the past couple of decades I often found myself looking at an
info page and wondering how to navigate it, hitting various keys and getting lost and frustrated.
man info, but that didn’t tell me how to navigate the pages. More rarely I would try
info info, but didn’t have the time or patience to do follow the tutorial there and then as I was busy trying to get some information, stat.
The other day I finally had enough and decided to take the time to sit down and learn it properly. It didn’t take that long, but I figured there was a case for writing down a helpful guide for new users that just want to get going.
The Bare Minimum
Here’s the bare minimum you need to read through an info page without ever getting lost:
]– next page
[– previous page
space– page down within page
b– page up within page
If you want to get commands into your muscle memory as fast as possible, focus on these. It won’t get you round pages efficiently, but you won’t wonder how to get back to where you were, or how you got where you are. If you’re a very casual user, stop here and come back later when you get fed up of spinning forwards and backwards through pages to find something.
Try it with something like
If you want to get to the next level with
info, then these commands will help:
n– next page in this level
p– previous page in this level
return– jump to page ‘lower down’
l– go back to the last node seen
u– go ‘up’ a level
info has a hierarchical structure. There is a top-level page, and then ‘child’ pages that can have other pages at the same ‘level’. To go to the next page at the same level you can hit the
n key. To go back to the previous page at the same level you hit
Occasionally you will get an item that allows you ‘jump down’ a level by hitting the
return key. For example, by placing the cursor on the ‘Definitions’ line below and hitting
return you will be taken to
* Introduction:: An introduction to the shell. * Definitions:: Some definitions used.
To return to the page you were last on at any point, you can hit
l (for ‘last page’) and you will be returned to the top of that page. Or if you want to go ‘up’ a level, type
If you’re still interested then you might want to read through
info info carefully, but before you do here’s a couple of final tips to help avoid getting lost in that set of pages (which I have done more than once).
First, when you get stuck or want to dig in further, you can get help:
?– show the info commands window
h– open the general help window
Confusingly, these options opens up a half-window that, in the case of
h at least, gives no indication of how to close it down again. Here’s how:
C-x 0– close the window
x together, followed by
0 gets you out.
You might wonder what the point of learning to read
info pages is.
For me, the main reasons are:
- They are often far more detailed (and more structured) than
- They are more definitive and complete. The
grepinfo page, for example, contains a great set of examples, a discussion on performance, and an introduction to regular expressions. In fact, they’re intended to be mini books that can be printed off when converted to the appropriate format
- You can irritate and/or intimidate colleagues by dismissing
manpage usage as ‘inferior’ and asserting that real engineers use
Aside from anything else, I find getting fluent with these pieces of relative arcana satisfying. Maybe it’s just me.