what to do when ctrl-c can't kill a process?

Posted by Dustin Boswell on Super User See other posts from Super User or by Dustin Boswell
Published on 2011-02-09T08:49:24Z Indexed on 2011/02/09 23:28 UTC
Read the original article Hit count: 244

Filed under:
|
|

Ctrl-c doesn't always work to kill the current process (for instance, if that process is busy in certain network operations). In that case, you just see "^C" by your cursor, and can't do much else.

What's the easiest way to force that process to die now without losing my terminal?

Summary of answers below: Usually, you can Ctrl-z to put the process to sleep, and then do "kill -9 process-pid", where you find the process's pid with 'ps' and other tools. On Bash (and possibly other shells) you can do "kill -9 %1" (or '%N' in general) which is easier. If Ctrl-z doesn't work, you'll have to open another terminal and kill from there.

© Super User or respective owner

Related posts about linux

Related posts about bash