How to reset a broken TTY?
Usually, running reset
resets the terminal. Some key bindings from .inputrc
might be lost, though.
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.
You can try the ANSI reset command:
printf "\033c"