how to force stop Intellij on linux

salyela picture salyela · Oct 4, 2018 · Viewed 21.2k times · Source

I am using a scratch file for some Kotlin work.

  • I accidentally created an endless loop in one of my functions and ran the file, so Intellij is not responding.

  • There is no button for stopping the execution of the scratch file and even if there were, that wouldn't work because Intellij is not responding to mouse clicks.

How do I force stop or restart Intellij in this case?

Answer

rgen3 picture rgen3 · Oct 5, 2018

You can kill the process by name using

pkill -9 intellij

or by

killall -9 intellij

or even

kill -9 $(ps aux | grep intellij | awk '{print $2}')