Clear! (clear your terminal screen)

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
9,093
Reaction score
7,713
Credits
74,241
I've been using linux and the command line since the late 1990s, and I never knew about the Ctrl-l. Thank you! :)

From here:


The difference between clear and CONTROL+L is that clear overwries the last command’s exit code ($?) with its own, 0, whereas CONTROL+L doesn’t –it is not a command, but a terminal emulator shortcut.

So, there's what's going on. Someone left it as a comment when I wrote a similar article. I knew that it was a shortcut, but didn't really know what clear was doing.
 


C

CrazedNerd

Guest
Something i've been wondering: is there a way to be able to scroll upward if you produced a monstrous input? There's usually a cutoff point after a certain number of lines (probably a few thousand). I would think some shell variable controls this, or maybe just configuring the gnome-terminal itself.
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
9,093
Reaction score
7,713
Credits
74,241
Change the history. You can make your terminal history infinite lines. For example, using xfce4-terminal:

7HPhEdG.png
 

BigBadBeef

Active Member
Joined
Sep 23, 2021
Messages
320
Reaction score
147
Credits
2,929
Whenever I clear the terminal, I use it to conceal my own criminal incompetence. Sometimes its downright painful to look at, even if I was the one who typed it out!
 

sphen

Well-Known Member
Joined
Dec 12, 2022
Messages
648
Reaction score
566
Credits
7,459
Whenever I clear the terminal, I use it to conceal my own criminal incompetence. Sometimes its downright painful to look at, even if I was the one who typed it out!
Remember to clear the history, too. It is useful to know, so you can be sure to hide the evidence! ;-)

history -c
 

wendy-lebaron

Active Member
Joined
May 3, 2023
Messages
210
Reaction score
51
Credits
2,882
Most of these replies in my experience. But on KDE, Konsole has CTRL+SHIFT+K which is like clear command. If I don't have to type five letters then ENTER key then I won't. :)

I don't need to blitz my history, I just want a clear screen without any funny scrollbar business.

EDIT: my apologies to anyone who read this message before it was edited. Have checked, currently on Manjaro KDE. Have to hold two modifier keys not just "control".
 
Last edited:
MALIBAL Linux Laptops

Linux Laptops Custom Built for You
MALIBAL is an innovative computer manufacturer that produces high-performance, custom laptops for Linux.

For more info, visit: https://www.malibal.com

Members online


Top