On gnome-terminal
I'm used to type clear
or ctrl+L
to clear the terminal and I can still scroll back to view all previous outputs. On konsole - KDE
, running the clear
command removes the outputs on the screen. I can still scroll back but the content of the previous screen is removed. I only need to shift the output not remove it.

- 21
1 Answers
You've unwittingly become used to the semantics of paper terminals rather than video terminals.
On an old paper terminal, there was a Form Feed control character which caused the (usually continuous, fan-fold) paper to roll up to the start of the next sheet/form, and old lines would be on a long trail of paper hanging off the back of the terminal.
On video terminals from the 1960s, 1970s, and 1980s, there was a fixed size screen that could be erased, alongside explicitly moving the cursor back to the home position. Usually the Form Feed control character did not do this. It would just act like a newline, and there would be a different Erase Display control sequence for erasing the screen (c.f. Erase Display and Form Feed on the DEC VT series of video terminals).
Video terminals were not like some contemporary home computers' PRINT CHR$(12)
in this respect.
And your Control+L is actually divorced from outputting the Form Feed character.
It's a binding in your shell's command-line editing library (ZLE, or GNU Readline, or editline) that ends up in fact emitting the Erase Display control sequence, as if by tput clear
.
Some terminal emulators have changed from the video terminal paradigm, effectively reintroducing the old paper terminal semantics, of having sheets of scrolled-off stuff hanging off the top of the terminal. When the emulated video terminal scrolls, scrolled-off stuff is pushed into the scrollback buffer, and erasing the display (normally) only erases the part that is below the bottom of the scrollback buffer.
Some GUI terminal emulators take this idea of going back to the old paper terminal semantics quite far. GNOME Terminal is one. It doesn't erase the screen like a video terminal at all, now. Ask it to Erase Display and it will perform a Form Feed instead, pushing everything into the scrollback buffer. (No, this is not the correct thing to do; clearly.)
You have become used to the GNOME Terminal way of doing things. Be aware that these are the very old paper terminal semantics, not the (less old) video terminal ones. You will not get them with other terminal emulators that are more in line with the latter, such as Konsole.
For other terminal emulators, you have to treat them as video terminals rather than paper ones. Erase Display is not erroneously Form Feed, and Form Feed doesn't feed a bunch of pseudo-paper through. You need to:
- Unbind Control+L from its current binding (named
clear-screen
in ZLE and in GNU Readline) that erases the display then redisplays the command-line editor. - Bind Control+L to a different widget that scrolls the video terminal up then redisplays the command-line editor. Notes:
- There is likely no handy pre-supplied widget for this. You'll have to make one, or find one already made. The terminfo capability name is
indn
,SF
in termcap. - The control sequence to emit is the standard Scroll Up control sequence rather than the Erase Display control sequence. Konsole understands the Scroll Up control sequence.
- However, on genuine video terminals such as the DEC VT525 Scroll Up was implemented as a window pan rather than a scroll. (The 525 displayed multiple terminal sessions in windows.) So don't expect this to work on some real video terminals.
- There is likely no handy pre-supplied widget for this. You'll have to make one, or find one already made. The terminfo capability name is
Further reading

- 68,745