如何从Visual Studio Code集成终端在Windows上使用Bash? [英] How do I use Bash on Windows from the Visual Studio Code integrated terminal?
问题描述
Windows上的Visual Studio代码默认情况下使用PowerShell作为集成终端.如果要使用Visual Studio Code中的Bash,应遵循哪些步骤?
Visual Studio Code on Windows uses PowerShell by default as the integrated terminal. If you want to use Bash from Visual Studio Code, what steps should be followed?
推荐答案
打开Visual Studio代码,然后按住 Ctrl + `来打开终端.
Open Visual Studio Code and press and hold Ctrl + ` to open the terminal.
使用 Ctrl + Shift + P 打开命令选项板.
Open the command palette using Ctrl + Shift + P.
类型-选择默认外壳
从选项中选择Git Bash
Select Git Bash from the options
单击终端窗口中的+图标
Click on the + icon in the terminal window
新终端现在将是Git Bash终端.给它几秒钟来加载Git Bash
The new terminal now will be a Git Bash terminal. Give it a few seconds to load Git Bash
您现在也可以从终端的下拉菜单中在不同的终端之间切换.
You can now toggle between the different terminals as well from the dropdown in terminal.
这篇关于如何从Visual Studio Code集成终端在Windows上使用Bash?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!