5

I am running Ubuntu GNOME 15.04 with GNOME 3.16 and my current default pager for man is less (I think), but I would like to change it to something else like more, does anyone know how this could be achieved?

3 Answers 3

3

Use the environment variable MANPAGER

export MANPAGER=more

e.g. in your ~/.profile or systemwide in /etc/environment

Thus only is affected the man command.

2

The easiest change would be to configure it by placing in ~/.manpath:

DEFINE pager more

Alternatively, you can set the environment variable MANPAGER to the program you want to use, as noted by A.B. Or if you generally prefer less to more, you can also set it on PAGER, which is also honored by other programs, like git.

man searchs a pager by:

  • using the program set in $MANPAGER, else…
  • using the program set in $PAGER, else…
  • using the pager setting from the configuration (first user, then global) else…
  • using the default pager set in the ./configure step else…
  • using the cat setting from configuration (first user, then global) else…
  • using cat
3
  • @A.B. are you sure you don't have MANPAGER set? You may use env -i TERM=$TERM PAGER=mypager man man for testing
    – Ángel
    Sep 28, 2015 at 15:28
  • I will check it again :)
    – A.B.
    Sep 28, 2015 at 15:38
  • PAGER isn't ignored, sorry =)
    – A.B.
    Sep 28, 2015 at 16:41
1

In addition to the given answers one can change the Ubuntu default pager by running

sudo update-alternatives --config pager

This will list a couple of pagers and ask to choose one.
This will change the default pager for man and for other programs too.

You must log in to answer this question.