BASH – fix the display

by on August 8, 2006 · 6 comments· LAST UPDATED January 4, 2008

in , ,

Sometime my R & D result into weird output. You will be not able to access your bash terminal. It will be full of wired character sequences that can lock down your display. These characters will hide what you type or character displayed into strange symbols.

Fixing the display

For example, accidentally you run cat command over binary file (try cat /bin/bash)
BASH - fix the display
To fix the display just type the reset command. It will initialization terminal again for you.
$ reset

If reset command failed to work type the following command to restore the session to a normal state:
$ stty sane

Press CTRL + L to clear the screen (or type clear command):
$ clear

Read man pages of stty and reset for more information:
man stty
man reset

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 6 comments… read them below or add one }

1 Joe August 9, 2006 at 3:32 pm

I can’t count the number of times I’ve screwed my terminal up like this. Usually I just close the window. Thanks for the fix!


2 raj August 10, 2006 at 9:21 am

same here joe. I use to close bash window.

this is great fix


3 nixCraft August 10, 2006 at 9:29 am

Glad to know *this display fix* is helping all of you.

Appreciate your feedback


4 quantumtroll February 11, 2008 at 1:47 pm

This did not work for me. I guess I’m stuck killing the terminal and starting over, but I don’t understand what could go so awry that stty and reset don’t help…


5 antonio luna March 10, 2009 at 2:37 am

Hi. I know this sounds stupid. But I would like to know, Where or what subject it. I can search while looking for classes so I can learn how to run Line Print Terminals.
I worked as a temp on a Mill for a few month operating a locomotive. while working there, I notice that came to fix the machinery got paid 200 $ hour. I want that money!!.


6 Tony February 23, 2013 at 11:17 pm

@antonio lol …what..?


Leave a Comment

Tagged as: , , , ,

Previous post:

Next post: