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 ?


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.