How to kill a hung Linux process#

A process stops responding normally. When you try to exit it using CTRLC, it prints ^C instead. Whatever you type is just printed on the screen.

The process seems to be hung, and you hate restarting a new instance of the terminal.

Solution#

Try CTRL\

If that doesn't help, send the process of the background using CTRLZ. Then bring it back:

$ fg

If even that doesn't help, send it to the background again, and:

$ kill $!

There you have you terminal free again.

No more closing of the terminal instance because of a frozen process. Happy hacking!

Tweet this | Share on LinkedIn |