Increase buffer size while running screen
Solution 1
Do Ctrl + a : then enter scrollback 1234
sets your buffer to 1234 lines. You enter scrollback mode ("copy mode") with Ctrl + a Esc, then move in vi-style, leave copy mode with another Esc
Solution 2
I actually figured this out after looking through the man page. Setting the screen buffer inside .screenrc
does work, but you can change it inside your screen session.
Ctrl-a + : and typing
scrollback 1000
gives you a 1000 line buffer.
You can also set the default number of scrollback lines in .screenrc
by using
defscrollback 1000
Then entering copy mode will let you scroll around.
Solution 3
You actually do have something of a buffer, but it's invisible to most terminal emulators (which is why e. g. scroll bars don't appear to work). One way to get at it is to enter copy mode (Ctrl-A,[ followed by arrow keys, PgUp, et cetera). The size of this buffer can be configured in .screenrc
. You you an change its allocation inside your screen session:
Ctrl-a + : and typing
scrollback 1000
gives you a 1000 line buffer.
Solution 4
I would like to point out if you wants to change Screen settings globally (all users) then you can edit /etc/screenrc
file. (Ubuntu). File path might be different on other distros.
In your case you can add the following lines to the file:
# define a bigger scrollback, default is 100 lines
defscrollback 1024
Related videos on Youtube
ProdIssue
Updated on September 18, 2022Comments
-
ProdIssue over 1 year
I use screen as my window manager through putty. Screen has been great, but I need a way to increase my buffer when I run commands. I have no buffer when I scroll up, no std out is saved beyond my window size on any terminal.
How can I increase this I can't seem to find an option in the commands? Ctrl + a ? doesn't seem to have what I am looking for.
-
ProdIssue about 7 yearsThat definitely sounds like a solution I will try this, I use Ctrl + a, Esc to get into copy mode personally, but they both work
-
ProdIssue about 7 yearsYes this definitely works, I just figured this out myself at the same time haha
-
Philippos about 7 years@DopeGhoti Yes you can in a running session like with other commands; see other answers
-
Pankaj Goyal about 7 yearsI noticed this. Updating my answer to incorporate this.
-
r3robertson over 5 yearsThe explicit instructions for
.screenrc
make this the most useful answer -
Ciro Santilli Путлер Капут 六四事 almost 5 yearsIt would be good to clarify even more explicitly that
scrollback
does not work in.screenrc
, onlydefscrollback
does.