How to reset a broken TTY?
--------------------------------------------------
Become or hire the top 3% of the developers on Toptal https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Over Ancient Waters Looping
--
Chapters
00:00 Question
00:38 Accepted answer (Score 20)
01:06 Answer 2 (Score 47)
01:23 Answer 3 (Score 20)
01:36 Answer 4 (Score 11)
02:11 Thank you
--
Full question
https://superuser.com/questions/640338/h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#linux #unix #terminal #tty
#avk47
Become or hire the top 3% of the developers on Toptal https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Over Ancient Waters Looping
--
Chapters
00:00 Question
00:38 Accepted answer (Score 20)
01:06 Answer 2 (Score 47)
01:23 Answer 3 (Score 20)
01:36 Answer 4 (Score 11)
02:11 Thank you
--
Full question
https://superuser.com/questions/640338/h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#linux #unix #terminal #tty
#avk47
ANSWER 1
Score 54
Usually, running reset
resets the terminal. Some key bindings from .inputrc
might be lost, though.
ANSWER 2
Score 26
You can try the ANSI reset command:
printf "\033c"
ACCEPTED ANSWER
Score 22
Run echo ^v^o
, that is echo
and then Ctrl-v
and then Ctrl-o
, Enter. You will not see the Ctrl-v
. It will display as echo ^O
. Ctrl-v
sets it into verbose mode, passing through control characters, and the Ctrl-o
will reset the terminal.
ANSWER 4
Score 14
My terminal didnt display any characters I typed. None of the other tricks worked. This one works:
stty sane
Worked for me. I sometimes have a terminal in an unresponsive state, but none of the other suggestions could give me the output back again. The other suggestions I tried, but didn't work:
echo ^v^o
reset
printf "\033c"