Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a option to search within manpages?

share|improve this question
Do you mean search within all the manpages to find which one has certain content, or search within one given manpage for a certain phrase? – frabjous Jan 9 '11 at 16:32
@frabjous i meant within one manpage, is there also a option to search all? – NES Jan 9 '11 at 16:49
I added that too. By the way, you can also type man man to read all of the technical details about man-pages. – Stefano Palazzo Jan 9 '11 at 16:59
up vote 60 down vote accepted

Just hit /, and type your search pattern.

  • Patterns can be regular expressions, for example, you could search for the word "option" by typing


    Or find all of the long arguments with


    To cancel the search, hit Ctrl+C.

    Some useful quantification operators are:

    ?    for zero or one of the preceding expression
    *    for zero or more of the preceding expression
    +    for one or more of the preceding expression

    And expressions can be "grouped" with parentheses, as in (--)+ (for two or more dashes).

    [a-Z] is a sequence (others include [0-9], [a-z] and so on), they can be combined, as in [a-Z0-9]. You can also invert expressions with the ^ operator, e.g. (--)[^a-Z]+ for all long arguments that start with anything other than a letter.

    Another useful operation is Union (|), as in color|colour, which finds every occurrence of either color or colour (this is sometimes called boolean OR).

  • To jump through the results, press N (forwards) and Shift+N (backwards).

  • There is also a way to search across all manpages:

    man -K "Hello World"

    The man program will open the first match, and after you close it with q, offer you to

    • view the next one (Return)
    • skip the current one (Ctrl+D)
    • or exit (Ctrl+C).
share|improve this answer
this depends on your pager alternative: update-alternatives --display pager. This is correct for less – shellholic Jan 9 '11 at 16:35
is there also an option to browse through the results with a key? i.e. as in firefox you would press F3 and the cursor jumps from one result to the next? – NES Jan 9 '11 at 16:37
great, thanks, a lot. – NES Jan 9 '11 at 16:48
Another useful tip for less, instead of using [oO][pP]... for each character, use -i to toggle case sensibility. – Lekensteyn Jan 22 '11 at 14:55
Hmm Ctrl+C to cancel doesn't seem to work for me. Esc+U does though. – evanrmurphy Sep 4 '14 at 3:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.