Server Fault is a question and answer site for system and network administrators. 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 have loaded debian etch into my NAS and I am trying to use it to routinely extract information from a website. Since there are quite a lot of pages to download, I used the nohup command, like this:

nohup ./ $

Then the script runs as expected, but suddenly I changed my mind and want to modifiy the script a bit before running it again. How can I terminate the script which is now running?


share|improve this question
up vote 3 down vote accepted

You can find the pid of the script using:

ps aux|grep

Then kill it using

kill -15 <the pid>

This sends the SIGTERM signal to the process, which can be caught to allow clean (graceful release of system resources). Alternatively, you can use the SIGQUIT process with -3, which is capable if generating a core file (if you want one).

share|improve this answer
info nohup said: "nohup runs the given COMMAND with hangup signals ignored". So kill -1 doesn't work. – quanta Sep 7 '11 at 16:12
@quanta Yes, you're correct. – Dana the Sane Sep 7 '11 at 16:26

nohup prevents the processes from receiving SIGHUP. So, you must use -15 (SIGTERM) or -9 (SIGKILL) with kill command.

share|improve this answer
SIGKILL should only be used as a last resort though, since system resources may not be freed – Dana the Sane Sep 7 '11 at 16:31

Your Answer


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

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