Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

...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 stackoverflow.com Jan 4 '11 at 22:02

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

3 Answers 3

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.