Visual Studio Code Integrated Terminal

banner

Visual Studio code has a great feature called Integrated terminal. It provides the ability to have a  Shell terminal while working with your files. In Windows,  the default terminal is PowerShell, however this can be changed easily.

In this blog post, I’m going to show you how to integrate any Shells you may want to have available while you’re working in Visual Studio code.

For this example I will use two of the easiest terminals available in Windows 10. The first one is the one that comes from installing the GIT version control system and the second one comes from installing the Ubuntu bash in Windows feature. These are the steps:

  1. First step is to install either one of this software packages
  2. Configure Visual Studio code settings and  default terminal
  3. End to End configuration Video

 

Installing new Shells

These are the two easiest options to have a BASH shell avaliable:

Once you have installed any of these, the Shell executables are located here:

PowerShell: C:\WINDOWS\Sysnative\WindowsPowerShell\v1.0\\powershell.exe
GIT Bash: C:\\Program Files\Git\bin\bash.exe
Ubuntu in Windows 10 C:\Windows\sysnative\bash.exe”

 

Configure Visual Studio code settings and default terminal

Once installed can set your setting by clicking  File > Preferences > Settings and search for this setting: terminal.integrated.shell.windows.  Select the User Settings window and add the following code (enable the shell you would like as default):

{
 //Terminal Configurations

 //PowerShell Configuration
 "terminal.integrated.shell.windows": "C:\\WINDOWS\\Sysnative\\WindowsPowerShell\\v1.0\\powershell.exe"

 //GIT Bash Configuration
 //"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"

 //Ubuntu in Windows 10 Configuration
 // "terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\bash.exe"
}

 

End to End configuration Video

I created a short video to show you how to complete the configuration:

 

 

This entry was posted in Linux, Powershell, Ubuntu, Ubuntu in Windows 10, Uncategorized, Visual Studio Code. Bookmark the permalink.