Troubleshooting Terminal Problems

Messed-up terminals are an occasional problem that system administrators have to deal with. When a terminal is hung (when it won’t respond to any input) or seems to have gone crazy, here are some things to try that address the most common causes:

  • If the user knows what she did last, try to undo it. For example, if she was experimenting with stty options, try a stty sane command.

  • If the terminal doesn’t respond at all, the user might have accidentally hit Ctrl-S, the pause key, the hold screen key, or something else that temporarily stops output. Try entering Ctrl-Q and then these other keys to see if things get going again.

  • Check the terminal settings via its setup menu. In particular, is its baud rate set correctly?

  • Try entering the reset command. If it doesn’t work, try preceding and following it with a line feed (Ctrl-J if the terminal has no line feed key):

                      ^Jreset^J

    Substituting stty sane in place of reset can also work. Running either command twice in succession is frequently necessary.

  • If the user has turned the power off and back on, check other settings like the emulation mode. If the user hasn’t cycled power, try this yourself; there are some conditions that only cycling the power will clear. Leave the terminal off for about 10 seconds to allow the internal capacitors to discharge completely.

  • Next, go to another terminal and try to kill the program that was running on the hung terminal. It may be that the program—and not the terminal—is hung. ...

Get Essential System Administration, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.