Home > Development Tools > phpstorm > Using gitbash as the terminal command line in PhpStorm

Using gitbash as the terminal command line in PhpStorm

藏色散人
Release: 2019-10-25 18:03:12
forward
4987 people have browsed it

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:

Using gitbash as the terminal command line in PhpStorm

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.

Using gitbash as the terminal command line in PhpStorm

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"
Copy after login

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!

Related labels:
source:learnku.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template