Recovering a Frozen Terminal
After you’ve been using a Unix (or logging into one via putty) for a while you’ll probably encounter a key combination that locks the term and leaves you unable to do anything. You’ll hunt around the keyboard pressing combinations until you sigh in despair and try Ctrl-C or Ctrl-D to kill the current command or the current shell respectively; and they won’t work. After some more key-bashing you’ll get lucky and the term will bomb out. This entry is an attempt to explain what’s happening and how to get around it in the hope that google will send other unwary Unix users to this page for a solution.
The key combination you’ve hit is Ctrl-S, this sends a stop signal to the terminal process that gives it the appearance of freezing. Anything you type here is still being queued up and will be actioned; this is why when you do hit resume the term dies if you’ve Ctrl-D’d. The correct way out of this is to hit Ctrl-Q, which sends a signal to resume and everything carries on working perfectly.
Occasionally this comes up on a mailing list and after the poster finds out the answer the typical reply is ‘that’s stupid behaviour’. While this trick is a lot less useful than it used to be it can still be useful to know, if you have a process writing to the screen at a high rate (and the scroll-back buffer isn’t set very high) the ability to stop and start what you see independent of the process itself can be very handy.