Enable bash terminal in PHPStorm on Windows 10

If you are using Linux or Mac OS, then using the PHPStorm(or any other IntelliJ IDE from Jetbrains) terminal is not a problem at all. You already have access to all bash commands. But if you ever wanted to use bash commands in Windows 10, which are specific for Linux, you probably got stuck. There is no solution that works since by default it uses cmd.exe program.

Let’s fix this.

Note: I recommend to use WSL: Replace PHPStorm terminal with WSL. That is much better!

First of all, you must install Git for Windows.
You can download the installer from this website: https://git-scm.com/

After this, you’ll get in your system some handy tools you can learn about. But for now, we are interested only in the bash terminal that is included in this installer. You can find it in the directory which contains all GitSCM files.

OK. Now we are ready to integrate the git terminal in PHPStorm.

Open PHPStorm settings, go to Tools->Terminal, and update the “Shell Path” with the following value:

"C:\Program Files\Git\bin\sh.exe" --login -i

Now start a new terminal session and you must be able to run commands that are available in Linux.

Enjoy!

Member since January 2, 2019

As a seasoned WordPress developer with expertise in various tech stacks and languages, I bring years of experience to every project I handle. My passion for coding and dedication to delivering exceptional work ensures that each project I take on is of the highest quality. I specialize in creating custom themes, developing plugins, and building full-scale web systems. By staying up-to-date with the latest industry trends and best practices, I incorporate cutting-edge solutions into my work.

Comments

    Your email address will not be published. Required fields are marked *