Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I do the following:

  1. Open
  2. Open a ssh session to a remote Linux server
  3. Open a screen session on the server
  4. Start a program who breaks with many lines of error reporting…

How can I scroll up to read that?

And no, fixing the program is not a solution for now…


locked by womble Nov 9 at 5:56

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

closed as off-topic by womble Nov 9 at 5:55

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow." – womble
If this question can be reworded to fit the rules in the help center, please edit the question.

I could be wrong, but I don't think linux TTYs hold any history, themselves. When you're on a console TTY, you can page back up by using Ctrl+PgUp, but I doubt that will work in your case. must be configurable to hold more than its default amount of history, though. (or is it too late for that?) – SmallClanger Nov 26 '10 at 14:25

6 Answers 6

You can modify .screenrc to allow mouse-based scrollback:

This works perfectly! – Robert Calhoun Jul 15 at 22:03

If you did a man screen you can see the options available.

When in screen you can do the following: CTRL+A (release), [

You can then use the arrows to scroll around the window. To get out of scrolling you can do a CTRL+C.

+1 for that. Ignore my comment, I somehow managed to blank the part that mentioned screen... – SmallClanger Nov 26 '10 at 14:44
@SmallClanger: Not only that, but the OP mentioned OS X, not Linux. Besides, on Linux, gnome-terminal and xterm, among others, have scroll-back buffers. Try shift-pageup. – Dennis Williamson Nov 26 '10 at 15:20

Nathan's got it right, though I've always been a fan of Ctrl+A + ESC. ESC is yet another way to get out of copy mode.

It is worth considering, however, that scrollback history has a size limit and if you really want to play it safe, it's generally better to either redirect output to a file (or pipe it to tee if you want screen output as well).

The scrollback is adjustable, though, using the defscrollback option in .screenrc. I typically keep mine set to 5000 lines, but sometimes I bump it up a bit. – jgoldschrafe Nov 29 '10 at 19:42

Besides using the scroll-back buffer in screen, may respond to Shift-Page Up (perhaps Shift-Fn-Up-Arrow on a MacBook).

Another option would be something like:

your_prog 2>&1 | less
Apparently in plain PgUp and PgDn will access the scrollback buffer, whereas Shift+PgUp and Shift+PgDn have to be used to send those keys to the application instead: – ak2 Nov 26 '10 at 16:10
up vote 3 down vote accepted

Ok, i got it:

Ctrl + A, ESC 

and then vim-like commands:

Ctrl + u or Ctrl + d

Press Shift when scrolling the mouse ...


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