How to close IntelliJ IDEA if it hung?
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
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