kleninmaxim's avatar

Correct launch of phpstorm from wsl in the console

How do I correctly run phpstorm from wsl in the console?

If I execute the command /mnt/c/Program\ Files/Sublime\ Text\ 3/sublime_text.exe . that opens sublime text and I can work in it.

But if I run the command with phpstorm /mnt/c/Program\ Files/JetBrains/PhpStorm\ 2021.3.1/bin/phpstorm64.exe . then this command will open the project only when I run phpstorm on windows. If phpstorm is not running, the command will not open the project, unlike sublime text.

How to correctly launch a project in phpstorm through the console in wsl, regardless of whether the program is running or not?

0 likes
4 replies
kleninmaxim's avatar

@OussamaMater In Jetbrains docs we're not find it, because it is a question of wsl and windows.

So, I can try to do it from toolbox from discussion, but it also looks wrong. Okay, I'll use the following, but I still think there is a better way:

alias pstorm='/mnt/c/Program\ Files/JetBrains/PhpStorm\ 2021.3.1/bin/phpstorm64.exe'
alias subl='/mnt/c/Program\ Files/Sublime\ Text\ 3/sublime_text.exe'
alias note='/mnt/c/Program\ Files/Notepad++/notepad++.exe'
villamarianne's avatar

Hi,

i found a solution that is working for me.

Run the following command(s) in your linux terminal. Installation path of phpstorm has to be in $PATH, otherwise you may need to provide the full path to the exe.

Open phpstorm from wsl

powershell.exe Start phpstorm64.exe .

With Alias in .bashrc:

alias pstorm='powershell.exe Start phpstorm64.exe'

And open phpstorm with

pstorm .

Hope that works for you too.

4 likes

Please or to participate in this conversation.