...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?


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

|improve this answer|||||

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"
|improve this answer|||||

you can pipe the man page to cat. Try:

man man | cat
|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

Your Answer

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