39

The phpstorm is not responding and i want to kill the process. this is the location of instalation: /opt/phpstorm/PhpStorm-143.1770/bin.

i cannot close it with the X button so please help me to close / restart it with the command line.

thanks.

0

1 Answer 1

101

All "processess" that are active can be seen with the "ps" command. From command line you can type ...

ps -ef | grep phpstorm

it will list all the process IDs

$ ps -ef| grep phpstorm
rinzwind  2819  2812  0 11:28 ?        00:00:00 phpstorm
rinzwind  2849  2820  0 11:29 pts/1    00:00:00 grep --color=phpstorm

The line with the "grep" is what you search for. The other one the executable. A simple ...

kill -9 2819

will stop "phpstorm".


A shorter method:

pgrep -f phpstorm

will list just the process ID and ...

kill -9 $(pgrep -f phpstorm)

will kill it.

Programs like "top" and "htop" can be used to list running processes.

6
  • 1
    Fine fine Ill edit that in :=D My idea was to explain what "ps" does ;-)
    – Rinzwind
    Feb 14, 2016 at 13:09
  • kill: failed to parse argument: '11197 11250 11289' Feb 14, 2016 at 13:31
  • sorry I cant test it on an actual phpstorm :P Is that from the last command. Cuz a "kill -9 11197 11250 11289" should work if those processes exist ;)
    – Rinzwind
    Feb 14, 2016 at 13:39
  • 2
    But kill -9 'pid1 pid2' won't! A comment from nicolas-bonnici: "You need to remove the quotes in order to make it work: kill -9 $(pgrep -f phpstorm)" Mar 18, 2018 at 15:51
  • 1
    kill -9 $(pgrep -f phpstorm) worked for me... Thanks. Apr 16, 2020 at 16:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .