I noticed that when using aliases, some programs launch pager directly (either from PATH or through PAGER). I'd like to define default pager for all cases, not just when I type the command.

Should I set PAGER or put pager in path instead of defining shell alias? What is the convention for other executables like editors?

1 Answer 1


The pager is most often executed by things outside of your shell, such as the man command, or various git subcommands, so a shell alias doesn't have the power to do anything in that majority of cases and therefore doesn't make much sense. There is a standard $PAGER environment variable — use it!

Alternatively, on a Debian system for system-wide configuration, try:

update-alternatives --config pager
  • And for editors, there's VISUAL and EDITOR.
    – muru
    Apr 24, 2016 at 12:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .