Super User is a question and answer site for computer enthusiasts and power users. 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

...probably a silly question but I could not beat google into telling me the answer so posting here:

I got 2 machines - Slackware 13 and Fedora 11.

On the slack machine, when I use man I can scroll all the way to the bottom then exit man and the info stays in my terminal window (which I find very convenient as I can read it while typing the command in question, copy-paste the options, etc.).

On fedora when I close man the man page info is gone.

How can I configure man (or is it the terminal?) to not remove the man page info on exit?

share|improve this question

migrated from Jan 4 '11 at 22:02

This question came from our site for professional and enthusiast programmers.

man uses less to display the man page. It is less that is causing the behaviour you are seeing.

One way to get around this is to set the MANPAGER environment variable to something like less -X

e.g. try: MANPAGER="less -X" man less

share|improve this answer
works. coooool... Thank you Sir! :) – Alan Jan 4 '11 at 11:16

The utility less, which is parsing your manpages in this case, uses the environment variable LESS. In your rc file (e.g. ".bashrc" if you're using the bash shell), set the LESS environment variable to "-X", which "Disables sending the termcap initialization and deinitialization strings to the terminal.", which in your case is unnecessariliy clearing the screen. In bash it looks like the following:

export LESS="-X"
share|improve this answer

you can pipe the man page to cat. Try:

man man | cat
share|improve this answer
This is also helpful as it leaves the info on the screen, but I like Wodin's solution better as it preserves the look and feel of man, i.e. you can scroll up and down and you can search the content with '/'. Anyway - thanks to both of you for providing these answers. – Alan Jan 4 '11 at 11:19

You must log in to answer this question.