Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know about the Linux clear command, but it just moves the previous output from the visible part of terminal window (KDE Konsole). I can still scroll up and see all previous text. Is there similar command that can erase entire content of a terminal window? (Something like clc in matlab.)

share|improve this question
Possible duplicate of superuser.com/questions/122911/bash-reset-and-clear-commands – Wesley Aug 9 '11 at 3:23
true, sorry for that – sivic Aug 9 '11 at 3:29
@wesley not a dupe. – xenoterracide Aug 9 '11 at 4:12
@rozcietrzewiacz: Close but I don't actually think this is a duplicate. The answer is the same, but not the need. – Caleb Aug 9 '11 at 20:01
up vote 8 down vote accepted

I'm sure you could make a command with dbus. But there is a shortcut for clear scrollback and reset by default. Ctrl + shift + x.

share|improve this answer
Yes! Finally an superb answer. Thanks! – sivic Aug 9 '11 at 4:53
Does "Ctrl + shift + x" work only in konsole? – rozcietrzewiacz Aug 9 '11 at 8:11
I don't know. I don't use anything else – xenoterracide Aug 9 '11 at 15:36
Ctrl+Shift+X does not work for me in Konsole Version 2.12.3 Ctrl+Shift+K does work – see superuser.com/a/123196/664 – Piotr Dobrogost Mar 22 '14 at 17:38

reset is enough. No need to explicitly clear scrollback with it.

share|improve this answer
reset is not working in Konsole – sivic Aug 9 '11 at 17:45

The RIS sequence (\ec) indeed doesn't clear history (Bug 171598), but in KDE 4 there's another sequence that does specifically clear history: \e[3J -- Bug 158235.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.