12

This question already has an answer here:

I can't close the IntelliJ IDEA when it hangs, how can I close it from the terminal?

P.S.: I think this question is different from "How to kill a unresponsive program from terminal?" because IntelliJ's process has name just 'java' so you can't really tell it apart by its name.

marked as duplicate by Eric Carvalho, andrew.46, karel, waltinator, Anwar Aug 3 '16 at 4:35

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.

  • In the System Monitor application you can clearly see which process belongs to IntelliJ IDEA. It's the process that has the IntelliJ IDEA icon to the left of it. Under the circumstances this seems to be an easier way to close IntelliJ than closing it from the terminal. – karel Aug 3 '16 at 8:14
  • I agree. But in the terminal you can't see it – frostmann Aug 3 '16 at 8:16
  • 2
    It doesn't matter because IntelliJ is a GUI app, so you can easily open the System Monitor too instead of the terminal. I have a custom keyboard shortcut for quickly opening my System Monitor. Even though this comment is not an answer within the constraints of your question, it should be an answer anyway IMO because it's a much easier way to do it. – karel Aug 3 '16 at 8:18
  • 1
    An easier way would be askubuntu.com/questions/19869/… – no terminal required like @karel suggests – David Foerster Aug 3 '16 at 9:44
21

It's running as a java process so you can use

killall java -9 

(Warning! This command kills all java processes)

Source: Intellij support forum

  • 1
    It would be safer to only kill java processes from IntelliJ's bundled JVM, e.g. killall /opt/intellij/jre64/bin/java. You can find the full path to a running IntelliJ's java process with ps -eo command | grep java | awk '{ print $1 }'. – John Mellor Apr 16 at 11:23
  • This worked for me excellently. Thank you. – Promise Preston Aug 22 at 14:50
3

You can list all processes with

ps aux

and you can search processes with

pgrep <process name>

Then you can kill the process you want with

sudo kill -KILL <pid>

You can read more about it here

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