如何从 Visual Studio Code 集成终端在 Windows 上使用 Bash? [英] How do I use Bash on Windows from the Visual Studio Code integrated terminal?

查看:25
本文介绍了如何从 Visual Studio Code 集成终端在 Windows 上使用 Bash?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows 上的 Visual Studio Code 默认使用 PowerShell 作为集成终端.如果要在 Visual Studio Code 中使用 Bash,应该遵循哪些步骤?

解决方案

  1. 使用 Ctrl + Shift + P 打开命令面板.

  2. 类型 - 选择默认配置文件

  3. 从选项中选择 Git Bash

  4. 点击终端窗口中的 + 图标

  5. 新终端现在将是一个 Git Bash 终端.给它几秒钟加载 Git Bash

  6. 您现在也可以从终端的下拉菜单中在不同的终端之间切换.

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?

解决方案

  1. Install Git from https://git-scm.com/download/win

  2. Open Visual Studio Code and press and hold Ctrl + ` to open the terminal.

  3. Open the command palette using Ctrl + Shift + P.

  4. Type - Select Default Profile

  5. Select Git Bash from the options

  6. Click on the + icon in the terminal window

  7. The new terminal now will be a Git Bash terminal. Give it a few seconds to load Git Bash

  8. You can now toggle between the different terminals as well from the dropdown in terminal.

这篇关于如何从 Visual Studio Code 集成终端在 Windows 上使用 Bash?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆