View Full Version : How do I kill a nohup job?

2010-Jan-06, 08:19 AM
I started a Unix process before I left work last night using the nohup command. Logging back in today, it's still running but I can't see it. It turns out it was all a load of crap and I want to stop it so I can redo it. How do I kill it?

2010-Jan-06, 10:42 AM
If you know the pid then it should be simply "kill <pid>", perhaps "kill -TERM <pid>" if it persists.
It's only the HUP signal that's disabled, KILL and TERM will still work.

When you say you can't see it, what do you mean?
Not listed in ps?
Then try "ps ax" (assuming a gnu style ps here), ps with no parameters only lists those of your processes that have a terminal, which a disconnected nohup job doesn't.

If you're on a Linux or *BSD system, you could try "killall <programname>", don't try that on other systems, there are some where it doesn't mean kill all processes named <programname> but rather means kill all processes.