WinCoder Blog

Bash on Windows as Integrated Terminal in Visual Studio Code

Visual Studio Code 1.2.0 is out now, and includes  a variety of exciting new features.  For example, a new integrated Terminal that allows you to stay within VS Code while using your platform’s shell.  You may have also heard that Bash support has been added to Windows 10 in the current Windows Insider Preview.  Hmmm???

In this post, we will show how to enable the Bash for Windows as an integrated terminal within Visual Studio Code =)

 

Requirements:

  • PC running Windows 10

 

Part 1 – Installing Bash on Ubuntu on Windows

Step 1:

  • Bash support for Windows will require enrollment in Windows Inside Preview Builds (Settings => Update & Security  => Windows Insider Program)

Update

Step 2:

  • Ensure you are on Windows Insider Preview Build 14316 or above (Settings => System => About)

Version

Step 3:

  • Enable Windows Subsystem for Linux in Windows Features and reboot if you are enabling for the first time

Feature

Step 4:

  • Install Bash for Windows (type “bash” on start menu then dmt Enter to run the installer)

Install

Part 2 – Adding Bash for Windows as Integrated Terminal in VS Code

Step 1:

Step 2:

  • Modify User Settings in VS Code (File => Preferences => User Settings) and add the following within the settings.json pane:
  • “terminal.integrated.shell.windows”: “C:\\Windows\\sysnative\\bash.exe”

VSCodeSettings

You can now toggle the terminal view with CTRL+` or (View => Toggle Integrated Terminal)


8 comments for “Bash on Windows as Integrated Terminal in Visual Studio Code

Leave a Reply

Your email address will not be published. Required fields are marked *