Configure WSL (Ubuntu) Bash as an external tool in PhpStorm on Windows 10

Settings:

 

Result:

I get the terminal, but it doesn't work correctly. 

No prompt.  Output from htop and cmatrix is garbled and ctrl-C will not stop those programs.  The clear command doesn't work.

 

Any suggestions as to what I'm doing wrong?

 

 

 

 

 

 

 

0
7 comments

Please use command ubuntu instead bash.

0
Avatar
Permanently deleted user

Hi Eugene,

 

No difference.  I'm still getting the same results using 'ubuntu' instead of 'bash' in the program tool settings.

0

OK, I totally messed up -  I thought you were talking about Terminal, not External Tool.

External tools are not intended to be used as Terminal. Any particular reason you can't use Terminal instead?

0
Avatar
Permanently deleted user

No worries.

I'm using Git Bash as the terminal and my understanding is that we can only configure one terminal tool in the IDE.  There can be several instances of the same shell running, but we cannot use different shells.

I want to keep using Git Bash as the terminal.  I was thinking maybe I could configure WSL Bash as an IDE external tool to get around this limitation.

0

I see. There's an existing request for that: https://youtrack.jetbrains.com/issue/IDEA-118856

For now, you'll have to enter 'ubuntu' in the second tab each time you re-open the project, unfortunately.

0
Avatar
Permanently deleted user

Looks like that request is 5 years old with no movement on it.

I've been launching the WSL shell from the desktop, then ssh into it from an IDE terminal tab.  Just trying to reduce some keystrokes :)

Thanks for your help.

0

Finaly, found a way how to run ubuntu terminal as phpstorm terminal.
Depends which wsl package was installed set the "Shell path" value:

"ubuntu" run bash

or

"ubuntu1604" run bash

or

"ubuntu1804" run bash

4

Please sign in to leave a comment.