How do I use Bash on Windows from the Visual Studio Code integrated terminal?

前端 未结 17 1879
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-28 00:28

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?

17条回答
  •  一个人的身影
    2020-11-28 00:46

    Things has been a little bit changed due to the latest updates on Visual Studio Code. The following steps work for me.

    1. Press Ctrl + Shift + P to open the Visual Studio Code command palate.

    2. Type >preferences: Open Settings (JSON) in the text area.

    3. Add the following lines at the end of the JSON file which is displayed in your right hand pane.

      "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"
      
    4. Close and reopen your Visual Studio Code instance.

提交回复
热议问题