How to Change Default Shell in VS Code

This guide provides a quick and straightforward walkthrough on how to change the default shell of the integrated terminal in Visual Studio Code (VS Code). Whether you want to switch between PowerShell, Command Prompt, Git Bash, WSL, Bash, or Zsh, you will learn how to update your terminal settings using the graphical user interface and the configuration files on Windows, macOS, and Linux.

The quickest way to change your default terminal shell is through the VS Code Command Palette.

  1. Open Visual Studio Code.
  2. Open the Command Palette by pressing Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (macOS).
  3. Type Terminal: Select Default Profile and press Enter.
  4. A dropdown menu will appear listing the available shells on your system. Select the shell you want to set as your default (e.g., PowerShell, Git Bash, Command Prompt, zsh, or bash).

Once selected, any new terminal instance you open (Ctrl+ or Ctrl+Shift+ ) will launch with your chosen shell.

Method 2: Using the Terminal Dropdown Menu

You can also change the default profile directly from the terminal panel interface.

  1. Open the integrated terminal in VS Code using the shortcut Ctrl+ (backtick) or by navigating to Terminal > New Terminal in the top menu.
  2. In the top-right corner of the terminal panel, click the downward-pointing arrow next to the + (plus) icon.
  3. Click on Select Default Profile from the dropdown menu.
  4. Select your preferred shell from the list at the top of the window.

Method 3: Editing the settings.json File

If you prefer to configure VS Code using code, you can define your default shell directly in your global settings.json file.

  1. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P).
  2. Type Preferences: Open User Settings (JSON) and press Enter.
  3. Add or modify the setting corresponding to your operating system:

For Windows:

"terminal.integrated.defaultProfile.windows": "Git Bash"

(Replace "Git Bash" with "PowerShell", "Command Prompt", or your preferred profile name).

For macOS:

"terminal.integrated.defaultProfile.osx": "zsh"

(Replace "zsh" with "bash" or your preferred profile name).

For Linux:

"terminal.integrated.defaultProfile.linux": "bash"
  1. Save the file (Ctrl+S or Cmd+S).

Your changes will take effect immediately for all newly opened terminal sessions.