Home >Development Tools >phpstorm >Using gitbash as the terminal command line in PhpStorm
I always use the git bash
command line. Every time I use it, I have to go to the project first, right-click Git bash here
, or right-click first and then enter the directory. It is a bit troublesome to use.
PhpStorm comes with a terminal interface, press ALT F12
to call it out. The default terminal used by PhpStorm under Windows is cmd.exe
, which is very different from git bash
and is very uncomfortable to use.
Now set the PHPStorm terminal from cmd
to git bash
to solve these two problems.
Related recommendations: "PhpStorm Usage Tutorial"
Open the settings of PHPStorm and locate Tools -> Terminal:
Change the Shell Path option to {git installation directory}\bin\sh.exe, reopen the terminal, and you can see that it has been switched to git bash.
In addition, git bash may have garbled Chinese characters. You need to find the ./etc/bash.bashrc file in the Git installation directory and add:
at the end.$ vim ./etc/bash.bashrc # support chinese export LANG="zh_CN.UTF-8" export LC_ALL="zh_CN.UTF-8"
The above is the detailed content of Using gitbash as the terminal command line in PhpStorm. For more information, please follow other related articles on the PHP Chinese website!