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:
- First step is to install either one of this software packages
- Configure Visual Studio code settings and default terminal
- End to End configuration Video
Installing new Shells
These are the two easiest options to have a BASH shell avaliable:
- GIT Bash: https://git-for-windows.github.io/
- Ubuntu on Windows: https://msdn.microsoft.com/en-us/commandline/wsl/about
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:
You must be logged in to post a comment.