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.
Method 1: Using the Command Palette (Recommended)
The quickest way to change your default terminal shell is through the VS Code Command Palette.
- Open Visual Studio Code.
- Open the Command Palette by pressing
Ctrl+Shift+P(Windows/Linux) orCmd+Shift+P(macOS). - Type Terminal: Select Default Profile and press
Enter. - 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.
- Open the integrated terminal in VS Code using the shortcut
Ctrl+(backtick) or by navigating to Terminal > New Terminal in the top menu. - In the top-right corner of the terminal panel, click the downward-pointing arrow next to the + (plus) icon.
- Click on Select Default Profile from the dropdown menu.
- 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.
- Open the Command Palette (
Ctrl+Shift+PorCmd+Shift+P). - Type Preferences: Open User Settings (JSON) and
press
Enter. - 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"- Save the file (
Ctrl+SorCmd+S).
Your changes will take effect immediately for all newly opened terminal sessions.