Its probably not so common problem among new-comer Linux users / admins but sooner or later even those who haven't will cat by mistake (or on purpose) some binary file end result will be physical console / terminal / SSH Client (lets say PuTTY) will display some non-sense characters and whether typing you will type in some "alien language" characters this continues until you close up console and re-login. Of course its not such a big problem to re-login or (kill active SSH session).
But there is no sense to do that and loose time and most importantly loose your logged in session (especially if you have hopped to 4 ssh sessions and you forgot to run GNU / screen). Thus its handy to know about
# reset
command. Once issued in most cases TTY messed up characters gets fixed up. However if even reset doesn't fix it, there is another "hack" to resolve it with no need for relogin. This is an old hack from my old Linux days and not so popular among admins, here is how:
Type
cat
press Enter
and then press
Ctrl + O (Ctrl ^ O)
then press Enter
and then again press
Ctrl + D (Ctrl ^ D)
Nice hack isn't it ? 🙂
More helpful Articles
Tags: binary file, end result, gnu linux, hack, Linux, loose time, mistake, new comer, old school, Putty, relogin, ssh session, ssh sessions, terminal 2f
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.57 Safari/537.36 OPR/37.0.2178.10 (Edition beta)
This is very useful. I used to always just kill my terminal sessions. “Reset” has been working
View CommentView Comment