>One of the most important commands I learned was "reset"
Used to use 'stty sane' to fix such issues, sometimes. Remember 'reset' too.
Also set many of the settings manually by doing this (if lucky enough to get the chance in advance, not always the case at customer sites):
When the terminal was in an okay state, do:
stty -a
where -a means show All settings.
Then read up on them (in man pages and manuals), and then when the terminal got borked (by a crashed curses or other program, or manual human error), manually set some of those settings back to normal values again, often all in one stty command, like:
stty ocrnl inlcr echo erase ^h intr ^c ...
(writing from memory, some may be wrong).
AFAIK many of the settings were poorly or not documented well - at least in the man pages. Solving many such issues for clients as a system engineer could be frustrating as well as exhilarating ...
Used to use 'stty sane' to fix such issues, sometimes. Remember 'reset' too.
Also set many of the settings manually by doing this (if lucky enough to get the chance in advance, not always the case at customer sites):
When the terminal was in an okay state, do:
stty -a
where -a means show All settings.
Then read up on them (in man pages and manuals), and then when the terminal got borked (by a crashed curses or other program, or manual human error), manually set some of those settings back to normal values again, often all in one stty command, like:
stty ocrnl inlcr echo erase ^h intr ^c ...
(writing from memory, some may be wrong).
AFAIK many of the settings were poorly or not documented well - at least in the man pages. Solving many such issues for clients as a system engineer could be frustrating as well as exhilarating ...