8

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 ?

vico
  • 4,447
  • 20
  • 55
  • 87
  • Have you tried `pkill netbeans`? –  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. –  Oct 20 '16 at 17:02

1 Answers1

20

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.

Anwar
  • 75,875
  • 31
  • 191
  • 309