Glam Prestige Journal

Bright entertainment trends with youth appeal.

Follow up on How to reset a broken TTY?, to fix the terminal after displaying a binary file,

I've tried all solution there, as well as those from

But my case is still not covered --

  • the command clear is not clearing screen
  • using arrow-up key to see previous commands, but if there is a shorter command comes after a longer one, the longer part still remains

to reproduce the case:

cat /bin/ls
clear
# clear is not clearing screen

How to fix that?

PS, my system:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux bullseye/sid
Release: testing
Codename: bullseye
$ echo $TERM
screen

I.e., it's screen session running under xterm.

2

1 Answer

Use reset command.

Simply type reset and press Enter a few times.

If this doesn't work then your TERM environment variable is not set correctly for some reason. Try export TERM=xterm then do reset again. To permanently fix it you may need to put export TERM=xterm in your ~/.bashrc or similar.

5

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy