VS Code SetupBeginner

How to Set the Default Terminal Shell in VS Code on Windows

Pick which shell (PowerShell, Command Prompt, Git Bash, or WSL) VS Code opens by default and switch between them on demand.

7 minBeginner

On Windows, VS Code can open several different shells in its integrated terminal: PowerShell, the classic Command Prompt, Git Bash, or a Linux distro running under WSL. Many AI coding tutorials assume a bash-like shell, so it helps to know how to choose your default and switch quickly. This guide covers both.

What you need

  • VS Code on Windows 10 or 11
  • At least one shell installed (PowerShell ships with Windows; Git Bash comes with Git for Windows)
  • WSL installed if you want a Linux shell (optional)

Step 1: Open the shell picker

Open the terminal with Ctrl+`. Click the small dropdown arrow next to the plus icon in the terminal toolbar, then choose Select Default Profile. VS Code lists every shell it has detected on your machine.

VS Code - select default profile
Select Default Profile
------------------------------------
PowerShell (pwsh.exe)
Command Prompt (cmd.exe)
Git Bash (bash.exe)
Ubuntu (WSL) (wsl.exe)
The profile dropdown lists detected shells.

Step 2: Choose your default

Click the shell you want as your default, for example Git Bash. From now on every new terminal opens with that shell. The change is written to your settings file automatically.

Step 3: Verify the setting

Open the Command Palette with Ctrl+Shift+P, type Open User Settings (JSON), and press Enter. You will see the default profile entry. You can edit it here directly instead of using the picker.

settings.json
{
  "terminal.integrated.defaultProfile.windows": "Git Bash"
}

Step 4: Open a different shell on demand

You do not have to change the default just to use another shell once. Click the dropdown arrow next to the plus icon and pick any profile from the list. That single terminal opens with the chosen shell while your default stays the same.

Git Bash - my-app
$echo $0
/usr/bin/bash
Confirms Git Bash is the active shell
$
WSL is the closest to Linux
If a tutorial uses Linux commands like apt or sudo, run it inside a WSL terminal rather than PowerShell or Git Bash. WSL gives you a real Ubuntu environment.

Result

Your terminal now opens with the shell you prefer every time, and you can spin up any other installed shell with two clicks when a task calls for it.

Watch related tutorials

Tags
#terminal#windows#powershell#wsl#settings