Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

After having played with curl, a binary file has been dumped inside my terminal. For example, the horizontal lines: ─ I use to format my prompt are replaced by 'q', and it can be much worse.

Why does this happen, and how can you fix it without having to close the terminal ?

share|improve this question

3 Answers 3

up vote 19 down vote accepted

I think reset would definitely fix it.

Consider looking into man page.


[m0nhawk@terra:~]> cat /dev/urandom
[└█┼░▒┬┐@├err▒:·]> c▒├ /de┴/┤r▒┼do└

And resetfixes this.

share|improve this answer
Worth to mention, if you run cat /dev/urandom, abort with Ctrl-C. Also, @Antoine, you could examine clear. I know you said "terminal", but, in the Linux console, there is (besides clear and reset) clear_console as well. – Emanuel Berg Oct 13 '12 at 13:24
In some cases, reset has been known not to solve this. echo -e '\017' can help there. – Alexios Oct 13 '12 at 15:53

Typing the command stty sane should fix it.

share|improve this answer

Best solution I've found is:

echo <ctrl-v><esc>c<enter>

I alias this to "unbinary"

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.