Screen: Scroll Up – Scrollback Buffer [SOLVED]

While using the screen command, you may notice that you can’t scroll up inside a screen session neither using the scroll bar or mouse wheel nor using the PageUp▲ or arrow up keys.

The scroll up seems to be not working because the screen command has its own scrollback buffer with the special key combinations for navigation.

In this short note i will show how to scroll up and navigate inside a screen session.

Cool Tip: Run a background process using the Linux screen command! Read more →

Scroll Up in Screen

Inside a screen session, press the Ctrl + A then Esc to enter a copy mode.

In the copy mode, you should be able to move your cursor around using the Up/Down arrow keys ( and ) as well as Ctrl + F (page forward) and Ctrl + B (page back).

To exit the copy mode and get back to the shell, press Q or Esc

You can also disable the alternate scrollback buffer by adding the following line to your ~/.screenrc file:

# Enable scrolling
termcapinfo xterm* ti@:te@

When disabled you can scroll up and down in a normal way while running the screen command using the scroll bar or the mouse wheel as well as PageUp▲ and PageDown▼ keys.

Note, that this will work for the new screen sessions only.

Cool Tip: How to rename a screen session! Read more →

Was it useful? Share this post with the world!

11 Replies to “Screen: Scroll Up – Scrollback Buffer [SOLVED]”

  1. Why on earth does screen have this “functionality”? It is a complete disgrace.

    1. Because old terminals had a fixed height and width.

    2. It means you don’t have to use your mouse to scroll back. Plus if you instead use ctrl-a [, then you can do it during long running commands without being yanked back to the current line!

  2. So useful! Thank you for the article!

  3. It works, thank for saving my life!

  4. thanks

  5. Works perfect on the 1st server, not on the second one. So strange, any clue why … ?
    Both Ubuntu 20.14 , copied the .bashrc to be sure …

  6. OMG thank you so much! I’ve been using screen for a while and this has always bothered me!

  7. Work for me!!
    Thanks to ur share

  8. Thank you for this knowledge!!!
    Without normal scrolling it was almost useless for me, except for running long ops.
    But now screen is my new shell ))

  9. Thanks, saved my time and nerves in big output changing every one second, based on time and data migrated!

Leave a Reply