DEV Community

Cover image for  6 Commands to Clear Linux Terminal

6 Commands to Clear Linux Terminal

rich1n profile image Richard Rodrigues ・1 min read

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 command

$ clear && clear

clear command


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

Did you like this article?

Comment your best Linux "clean screen" command

Discussion (5)

Editor guide
moopet profile image
Ben Sinclair

ctrl-l is bound to the same sequence as printf "\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?

aslasn profile image

Tbh I was expecting a clear && clear && clear

waylonwalker profile image
Waylon Walker
clear  && clear  && reset
Enter fullscreen mode Exit fullscreen mode
haxnet profile image

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.

waylonwalker profile image
Waylon Walker

I use clear all the time, and sometimes reset