What to Do When Your Session Seems to Be Hung

If you were in vi, it is possible that you are still in insert mode. In that case, all commands you type will echo to the screen but won’t execute. Press the Esc key to terminate insert mode. See if you can now use normal vi commands to check your file, and then save and exit, or exit without saving your changes. If that doesn’t solve the problem, go on to the next idea.

If you were in a pager program, input would echo to the screen but not be acted on. Press the Q key and then press the Enter key to see if that terminates the pager program and takes you back to the shell prompt. If that doesn’t solve the problem, go on to the next idea.

Try aborting whatever command you’re in. Press Ctrl+C, Delete, ...

Get Practical UNIX 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.