If Your System Hangs After Running a Linux Command, Here's How To Cause the Linux Prompt to Appear Again
When you run some commands in "not quite the right way", you may find that you are in a situation where it appears that you can not do anything at the shell prompt. This is usually indicated when the prompt does not appear or when you try to type text, but just keep hearing beeps each time you type. There are several ways that this can happen.
For example, you may have run a command without specifying enough of it to cause it to work correctly. In this case, you may need to specify more options, or the path to a directory or file.
Sometimes you cannot type at the prompt if you have accidentally run a command that runs a program, and you are "in" the program, but are not using the correct keystrokes to exit out of the program.
To make the Linux command prompt appear again, so that you can run more commands, try pressing "Ctrl + c" to stop the command that you typed in.
Linux Commands Training Tips: If you used the Ctrl key on the left side of the keyboard and were not able to stop the command, try using the Ctrl key on the right side of the keyboard.
Use "Ctrl + c" to try to stop a command first. If this does not work, then try pressing "Ctrl + z", using the Ctrl key on the left and then on the right.
What To Do When Your System Hangs in a Linux Terminal Emulation Window
If you are working in a Linux terminal emulation window and the above steps do not provide a shell prompt (so that you can continue to run commands), then simply close the terminal emulation window. After this, do the steps for your Linux distribution to open a new terminal emulation window.
What To Do When Your System Hangs in a Linux Virtual Terminal
If you are working at a Linux virtual terminal and these steps do not provide a shell prompt, then use Alt + Fx (and replace the x in Fx with a number from 1 to 6 – other than the number of the virtual terminal you are using ) to go to another virtual terminal.
The Linux command concepts covered here apply to ALL Linux distros, including Ubuntu, Red Hat, openSUSE, SUSE, Debian, Fedora and Slackware Linux.