Today, we’re going to learn to clear the terminal screen. This is generally done for privacy’s sake. You don’t want people to be able to scroll up and see what you’ve been reading in the terminal. This probably isn’t as important if you’re the only user and you’re in your house, but you may still like to keep things clean and tidy.
We’ll go ahead and cover two ways to clear the terminal in this article. They’re both rather easy commands and you’ll find this article is definitely not all that complicated, or even very long. This is pretty much one of the first things folks should have learned when they started using the terminal. We might as well cover it here.
Rather than make this long-winded, we’ll just make this into a short and easy article to read. Let’s all learn how to…
Clear The Terminal:
To be clear, this just erases the text in the terminal. It clears the scrollback content so that folks can’t scroll up and see the previous terminal contents. Again, it’s a good idea to do if you’re in a multi-user environment where people may have access to your screen and you don’t want them to know what has been written to the terminal.
Obviously, you need a terminal for this article. Just press CTRL + ALT + T and your default terminal should open.
I suppose we’ll need some content, so let’s try using this command:
That should fill your terminal up.
Now, to clear it you can use either of the two following commands:
Or you can also use:
(Though reset may leave a little text at the top, it still removes the terminal’s scrollback history.)
Both of those will do the job, with ‘clear’ being the obvious winner = but it’s nice to have options. They’ll clear the scrollback in the terminal, preventing folks from scrolling up to read what has previously been written there. Of course, they could potentially still press the arrow up button and see what commands you’ve written, so you can try to prevent that as well.
See? I told you that it’d be a quick and easy article. It’s not all that taxing to learn how to clear your terminal and that’s all that this article is meant to cover. Both of the two commands have a man page, but they’re not very useful commands for anything else but clearing the terminal. Have an easy day, a day where you can (maybe) say you learned something and not have to read a long article. After all, it was a quick and easy day for me!