Occasionally, when I'm developing on my Mac, I'll get a process that hangs. When that happens, I'll try the following:

  1. Ctrl + C in the active terminal window
  2. If nothing happens, I'll open a new terminal window and do kill -SIGTERM {PID}
  3. If still nothing, close the terminal window.

I'm running into situations where after doing both 1 and 2, the PID is still listed in my list of processes. In other words, there doesn't seem to be a command-line option to kill the process - all I can do is kill terminal.

In Linux command-line environments, we obviously don't have option 3. So do command-line interrupts operate differently there? Is there another way to kill processes I'm overlooking? What is the 'last resort' option for killing a Linux process?

2 Answers 2


Same as in OS X: Send SIGKILL.

  • I don't know that I've ever upvoted such a short answer.
    – killermist
    Aug 6, 2012 at 3:16
  • 1
    @killermist: Some things are hard to answer, and require a full essay in order to be complete. Some things are easy. Aug 6, 2012 at 3:17

You can try Ctrl + \ (control backslash), which sends the QUIT signal. This often works when SIGINT has been trapped.

Sometimes a process will ignore signals, because it is stopped.

You can use something like this, to kill a process gracefully if possible:

KILL() {
  kill -CONT "$@"
  kill -TERM "$@"
  kill -HUP "$@"
  sleep 1
  kill -KILL "$@"

KILL 12345

Even this might not always work. If there is some I/O error, such as a missing device, for example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.