A session can be hung for several reasons.
One of the most common is that the connection between your terminal
and the computer gets too busy and your terminal has to wait its turn.
(Other users or computers are probably sharing the same connection.)
In that case, your session will start by itself in a few moments.
try to "un-hang" the session by entering extra commands
because those commands will all take effect after the connection resumes.
If the system doesn't respond for quite a while (and how long that is
depends on your individual situation; ask your system administrator
for advice), the following solutions will usually work. Try these in
the order shown until the system responds.
You may have typed a command but forgotten to press
to tell the shell that you're done typing and it should now interpret the
If you can type commands, but nothing happens when you press
If this works, your terminal needs to be reset to fix the
Some systems have a
command that you can run by typing
If this doesn't work, you may need to log out and log back in or turn your
terminal off and on again.
If your shell has job control (see
This suspends a program that may be running and gives you another shell prompt.
Now you can enter the
command to find the program's name,
then restart the program with
or terminate it with
Use your interrupt key (found earlier in this chapter - typically
This interrupts a program that may be running.
(Unless a program is run in the background, as described in
shell will wait for it to finish before giving a new prompt.
A long-running program may thus appear to hang the terminal.)
If this doesn't work the first time, try it once more;
doing it more than twice usually won't help.
If output has been stopped with
this will restart it. (Note that some systems will automatically
if they need to pause output; this character may not have been typed
from the keyboard.)
Check that the
key is not locked or toggled on.
This key stops the screen display from scrolling upward.
If your keyboard has a
key that can be toggled on and off by pressing it over and over, keep
track of how many times you've pressed it as you try to free yourself.
If it doesn't seem to help, be sure you've pressed it an even number
of times; this leaves the key in the same state it was when you
Check the physical connection from the terminal to the system.
at the beginning of a new line.
Some programs (like
) expect text from the user.
A program may be waiting for an end-of-input character from you to tell it
that you've finished entering text.
may cause you to log out, so you should try this only as a last resort.
If you're using a window system, close (terminate) the window you're using
and open a new one.
Otherwise, turn your terminal off, wait ten seconds or so, then turn it
on again (this may also log you out).
If none of these works, you should then ask a local system expert for
help and watch carefully.