6

Sometimes I have hanged NetBeans on my Ubuntu system. How to kill it?

aux |grep [n]etbeans

gives too much id's in order to find correct one.

killall java

kills other java applications, but not NetBeans.

How to kill NetBeans 8.2 ?

  • Have you tried pkill netbeans? – user508889 Oct 20 '16 at 13:00
  • @bc2946088, it's not called netbeans in your process manager. It's called java, like he said. – anonymous2 Oct 20 '16 at 13:55
  • Try sudo pkill -f java. It usually takes care of hanging processes for me. – anonymous2 Oct 20 '16 at 13:59
  • He didn't say that, actually. He said there were too many ID's to find the correct one. I understand if the application isn't called netbeans, but that isn't indicated. @anonymous2 Any case, the answer posted would work as it would find anything in the process containing netbeans, not just in the application name itself. – user508889 Oct 20 '16 at 17:02
10

You can use

pkill -f 'netbeans'

Tested it and it works.

pkill --help says this

$ pkill --help

Usage:
 pkill [options] <pattern>

Options:
 -<sig>, --signal <sig>    signal to send (either number or name)
 -e, --echo                display what is killed
 -c, --count               count of matching processes
 -f, --full                use full process name to match
...

You can even use regular expression to filter the process name that suits your specific needs.

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.