Sunday, August 12, 2012

a bit about man

A few tips about Linux man pages:

See man man for general info on this topic.

Linux man pages are displayed by the less program, which is important to remember for quickly getting around inside of a man page. See man less.

For a keyboard reference, type h within a man page. This will bring up the “summary of less commands.”

To search for string in a man page, type a forward slash (/) followed by the string, then press Enter:

/string [Enter]

All instances of string will be highlighted. Toggle this highlighting by pressing Esc, then u.

If you press n, the page will go to the next line containing string. Shift+n will take you to the previous line containing string. Those lines will be at the top of the page.

To quit a man page, type q. The same thing will get you out of the “summary of less commands.”

Press the up arrow or down arrow to move back or forward one line at a time.

Press PageUp or PageDown to move back or forward one page at a time.

Press the Home key to go to the beginning of the document, and the End key to go to the end of the document.

Here's a table of commands and keys, from

Command / keyAction
e, j, Enter, or Downmove forward one line
y, k, or Upmove backward one line
f, Space, or Page Downmove forward one page
b, or Page Upmove backward one page
/characterssearch the manual page for the specified characters

(Source for the above table:

All Linux distros include man pages (as far as I know), but you can also find Linux man pages online. For example, you can easily find the man page for the ls command by typing man ls in your search bar. Or, do a search using the terms linux man pages, and you'll find results for different sites that contain man pages, and other info about them.

If you use Duck Duck Go, there's a !bang command that will take you directly to a man page. For example, for the man page for the cal command, type !man cal in Duck Duck Go's search bar.

No comments: