Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I stopped using the Unix process ctr + z. Then I tried to kill the process and did not work. A friend from school was recommended to use the kill -9 process_id. What is the magic combination?

share|improve this question

migrated from May 18 '11 at 15:38

This question came from our site for professional and enthusiast programmers.

should go on superuser. – Claudiu May 18 '11 at 15:37
Never trust "friend from school" recommendations, kill -9 process_id is quite a poor practice. – jlliagre May 18 '11 at 20:19
@jlliagre so what would you suggest as the correct practice? – slotishtype Jul 16 '11 at 11:56
"-9" or more precisely SIGKILL is a last resort signal, not something to routinely use. The correct practice for a suspended process is to first resume it as already answered. Should you want to kill it then, start by sending the "-15" signal (a.k.a SIGTERM) which give a chance for the process to exit gracefully. – jlliagre Jul 16 '11 at 14:20

Just follow normal kill by a resume (SIGCONT or in shell, fg the job).

The signal will only be received after the process is resumed (it cannot receive the signal because... you suspended it :))


kill -CONT $pid

to resume it if you no longer have access to the terminal or shell controlling the job

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.