Home  >  Article  >  System Tutorial  >  Fix linux console display garbled characters

Fix linux console display garbled characters

WBOY
WBOYforward
2024-03-27 20:01:25732browse

Sometimes my exploration outputs some weird stuff on the screen. For example, once I accidentally used the cat command to view the contents of a binary file - cat /sbin/*. In this case you will no longer be able to access bash/ksh/zsh in the terminal. A lot of strange characters flood your terminal. These characters will hide the content you enter and display %E

To restore normal display, just enter the reset command. It will initialize the terminal again for you:

$ clear

or:

$ reset

If the reset command still does not work, enter the following command to return the painting to its normal state:

$ tput reset

Press CTRL L to clear the screen (or enter the clear command):

$ stty sane
Use ANSI escaping�%8

The above is the detailed content of Fix linux console display garbled characters. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:linuxprobe.com. If there is any infringement, please contact admin@php.cn delete