Sometimes, as you running commands on a Linux terminal, you may feel that the terminal is 'filled up' with commands, text line and outputs and you may want to clear the terminal to declutter it and continue from the shining and clear top.
In this tutorial, we are going to explain how you can clear the Linux terminal.
Clear Command
Let's assume that your terminal is full of commands and output as shown below
Run the clear at the bottom of the terminal prompt.
$ clear
$ clear && clear
Results
The terminal screen gets cleared as shown below
Reset Command
There's also the reset command which will also do the trick.
$ reset
Ctrl + L Shortcut
The combination of ctrl+L will have the same effect as the clear or reset command.
printf "\033c" Command
$ printf "\033c"
Clear the Linux Terminal (KDE Only)
KDE terminal (Konsole) the following command to clear the console:
- clear && echo -en "\e[3J"
- ctrl + shift + k
Clear the Linux Terminal (GNOME)
For a GNOME terminal (like Ubuntu 20.04) you can add keyboard shortcuts as shown
- Shift + ctrl + alt + c
Discussion (5)
ctrl-l
is bound to the same sequence asprintf "\033c"
I believe.reset
has other effects, such as setting the foreground and background colours and effects back to their default and stopping interpretation of any flow control or OOB commands.What's the benefit from
clear && clear
?Tbh I was expecting a
clear && clear && clear
Ctrl + L
And I just alias cclear = "clear && clear" this is so you don't have to cd ..
I think you should put out a new screenshot showing that the terminal pwd is in several sub folders deep and then use the command.
I use clear all the time, and sometimes reset