I am encountering a couple of issues while usage of screen. I am using PuTTY

Let's say, I am attached to a screen and execute the command

ls -la

Assuming the output covers my entire screen, I then issue

vim a.txt

After quitting VIM, I don't see the result of the previous ls command which is unlike what I observe when I am detached from screen.

Also any command that has a long output, on scrolling up through a mouse is lost. I use the Ctrl+a+Esc combo to go into copy mode and then scroll, using arrow keys (mouse scroll fails here as well). Is there any faster alternative to do that ?

Screen version 4.01.00devel (GNU) 2-May-06

Linux 3.13.0-139-generic #188-Ubuntu

  • When you use screen the scrool behaviour changes, have you try to use CAPS + Page up and Caps+ Page down to scrool inside screen ?
    – Kiwy
    Mar 12, 2018 at 16:38
  • @Kiwy those key combinations don't work for me.
    – Zoso
    Mar 12, 2018 at 17:04
  • @Kiwy might have a special keyboard binding. The native one is ^a, [ to enter copy mode, in which you can scroll through the screen terminal's backlog.
    – DopeGhoti
    Mar 12, 2018 at 18:35
  • @DopeGhoti Thanks for that. It is almost at par with my choice for entering copy mode. Any idea on what might be happening for the first part to my question ?
    – Zoso
    Mar 13, 2018 at 12:03
  • If memory serves, programs such as vim that "preserve" the state of the screen as you describe use terminal control characters to present an alternate display layout for the application itself, which is switched back from when the application is terminated. However, screen itself is already using this functionality, so it is not available to other programs like vim to use.
    – DopeGhoti
    Mar 13, 2018 at 15:21

1 Answer 1


This works for me as of now. It essentially is

Type Ctrl-A+: then altscreen on<enter>. You may add this to your ~/.screenrc file to make it persist.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.