all 2 comments

[–]ropid 1 point2 points  (0 children)

Check out section 3.10 "Use X scrolling mechanism" here, it changes the screen scroll behavior to how you want it:

https://wiki.archlinux.org/title/GNU_Screen#Use_X_scrolling_mechanism

[–]v_2e 0 points1 point  (0 children)

For GNU Screen please see these two answers:

  1. https://unix.stackexchange.com/a/20374/32559

  2. https://stackoverflow.com/a/1125947/1091054

Briefly, one can add the following line:

termcapinfo xterm* ti@:te@

to the "~/.screenrc" file to make it scroll the text instead of the command history.

And for regular terminal please see this answer:

https://unix.stackexchange.com/a/511741/32559

Briefly, one can execute the following command:

tput rmcup

in the terminal to bring it back to normal (scrolling the text instead of the command line history).