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?
Updated: Newer versions of Visual Studio Code have the Select Default Shell command in the terminal pull down menu:
Remember that it just lists the shells that are in your %PATH% environment variable. For shells that aren't in your path, see other answers.
Extra tip: when you start bash it will just execute .bashrc
, if you have initialization commands in .bash_profile
you must copy it to .bashrc
. It's essential for using Conda enviroments in Git Bash.
The easiest way now (at least from Visual Studio Code 1.22 on) is to type Shift + Ctrl + P to open the Command Palette and type:
Select Default Shell
Now you can easily select your preferred shell between the ones found in your path:
For shells that aren't in your %PATH%, see the other answers.
See the complete Visual Studio Code shell reference. There's lot of meaty stuff.