0

This question already has an answer here:

Yes, I've tried all the basic kill, pkill, etc. methods that come up with a Google search.
Sometimes it works, other times it seems something is preventing the process from terminating.
There is no stderr message when the kill command fails, but ps, pgrep, etc. show the process is still running.

Is there a more forceful way to do this? Thanks.

marked as duplicate by Gilles process Jun 27 '17 at 22:37

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    Try kill -9 <PID> – Amit24x7 Jun 27 '17 at 7:30
  • First thing I tried. I thought it would work too, but no such luck in this instance, unfortunately. – tjt263 Jun 27 '17 at 8:14
  • OK, what happened when you tried? Did you get an error message? Nothing? What does the output of ps show for this process? Please edit your question and add this information. – terdon Jun 27 '17 at 11:30
  • @terdon yep, that info's already included in the question body. The command executed, without error. It appeared to be successful, but I noticed the (non-responsive) process in question was still running. Confirmed by pgrep, and also ps aux. Wouldn't even let me do a clean reboot. It's not the first time I've encountered this behaviour. – tjt263 Jun 27 '17 at 13:27
  • 1
    Yes, but can you please show us the output of ps so we can see what it reports for the process? Also, if you've tried kill -9 and that also fails, add that to your question too. The more detail you give, the more likely it is that we'll be able to answer. – terdon Jun 27 '17 at 13:38
1

kill -KILL $PID or kill -9 $PID will forcibly terminate $PID, unless you don't have the permissions to do so (i.e., it belongs to a different user and you're not root), but be very careful with it. Inflicting it on a process will prevent it from doing any kind of filesystem (or other) cleanup.

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