5

Whenever we use man command it opens the manual corresponding to the command(if exists). Operations on it are almost same as that of the less command(like search forward using / or backward using ? or browse forward using d etc). I am just curious whether man command internally invokes less command to display the manual contents?

5

By default, yes. This can be overridden via $PAGER and $MANPAGER in turn.

3

I would like to complement Ignacio's accepted answer.

Even the man utility has a manual that can be displayed by the man utility: man man.

The part answering your question:

Controlling formatted output

   -P pager, --pager=pager
          Specify which output pager to use.  By default, man uses less
          -s.  This option overrides the $MANPAGER environment variable,
          which in turn overrides the $PAGER environment variable.  It
          is not used in conjunction with -f or -k.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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