About nixCraft

Topics

BASH - fix the display

Posted by Vivek Gite [Last updated: January 4, 2008]

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

Tell us how we're doing: Please answer a few questions about your experience to help us improve nixCraft.

You may also be interested in other helpful articles:

Discussion on This Article:

  1. Joe Says:

    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 Says:

    same here joe. I use to close bash window.

    this is great fix

  3. nixcraft Says:

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

    Appreciate your feedback

  4. quantumtroll Says:

    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…

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Tags: , , , ,

Copyright © 2004-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.