Tricks and tips for finding information in man pages

Type slash / and then type the string to search for. Then keep pressing n to get to the next item


Pay attention to the section number: Suppose you want help on printf. there are at least two of them: in shell and in C. The bash version of printf is in section 1, the C version is in section 3 or 3C. If you don't know which one you want, type man -a printf, and all manual pages will be displayed.

If what you are looking for is the format of printf with all % codes and it doesn't appear on printf man page, you can jump to related man pages listed under SEE ALSO paragraph. You may find something like formats(5), which suggests you to type man 5 formats.

If you are annoyed that man printf gives you printf(1) and all you want is printf(3), you have to change the order of scanned directories in the MANPATH environment variable and put the ones for C language before the ones for shell commands. This may happen also when Fortran or TCL/Tk man pages are listed before C ones.

If you don't know where to start, type man intro, or man -s <section> intro. This gives you a summary of commands of requested section.

Sections are well defined:

  • 1 is for shell commands,
  • 2 is for system calls,
  • 3 is for programming interfaces (sometimes 3C for C, 3F for Fortran...)
  • 5 is for file formats and other rules such as printf or regex formats.

Last but not least: information delivered in man pages is not redundant, so read carefully from beginning to end for increasing your chances to find what you need.


man -k search

This will give you a list of all man pages which relate to 'search'.