You cannot retroactively increase the scrollback buffer length in the current session in order to recover old lines that have already been discarded. However, if you change the current scrollback
parameter setting (C-a :scrollback <number>
), it will add more space for future terminal output. You can also set the defscrollback
parameter to affect the initial scrollback
setting for new windows.
If you want to set the default for all windows of all new screen
sessions, make a ~/.screenrc
file with
defscrollback 50000
or, if you only want a big scrollback sometimes, put it in a separate file, like ~/screenrc-50k-scrollback
and invoke screen
like this:
screen -S <screen_name> -c ~/screenrc-50k-scrollback
Check the current scrollback buffer capacity with C-a i
(the info
command).
(22,1)/(25,40)+50000 +flow G0[BBBB] 0(bash)
^^^^^
Reference: GNU Screen manual, Scrollback section