14

I ran cat /etc/localtime to see the contents of /etc/localtime - however it's a binary file, so my console became like this:

alt text

You may notice the red text in screenshot is "LiveCD"; commands can be executed correctly, but they display in a weird way. I'm in the middle of an installation process, so I'd prefer to avoid rebooting. How can I return my display to normal?

UPDATE: after running make menuconfig to enter a GUI and quitting, it's back to normal.

3
  • 1
    The reason "make menuconfig" fixes your screen is that the program run is linked to a terminal handling library (libncurses I think?) and as part of the initialization of the program, it will reset the terminal to a known state.
    – hlovdal
    Commented Jan 4, 2010 at 21:19
  • just a note: this problem is not tied with the Gentoo distribution, it happens on every Linux distro. this scenario is typical for non-UTF8 console outputs. Commented Jan 5, 2010 at 8:54
  • See also: superuser.com/questions/68796/… Commented Jan 6, 2010 at 5:07

3 Answers 3

25

yeah, you've output (probably) binary to the console, and its faffed up the mapping.

In situations like this, the command you want is reset.

hit return (so you know you have a blank line), type in reset and hit return again. :-D

0
8

An alternative to the reset command is to output the ASCII SI (shift in) character, decimal value 15. This can be entered with Ctrl-O, and should work on any (even ancient) unix in case it laks the reset command.

prompt>
prompt>echo ^V^O
2
  • This worked for me whereas reset did not
    – sync
    Commented Dec 12, 2012 at 1:57
  • Oh, I had completely forgotten about ^V. Thanks for reminding me! =) Commented Sep 26, 2023 at 6:56
1

Try running the reset command. If hitting return before and after the reset command doesn't work, try control-J.

Also, Alt-F2 to switch to an alternate terminal can bypass the issue temporarily.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .