The Computer Oracle

How to reset a broken TTY?

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Game 2

--

Chapters
00:00 How To Reset A Broken Tty?
00:33 Answer 1 Score 26
00:43 Answer 2 Score 54
00:55 Accepted Answer Score 22
01:16 Answer 4 Score 14
01:42 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"

Source: https://unix.stackexchange.com/a/79686/53236