Last updated: Apr 6, 2024
Reading time·4 min
To change the default terminal in VS Code:
Ctrl
+ Shift
+ P
on Windows and Linux.Command
+ Shift
+ P
on macOS.F1
to open the Command Palette.Here is a screenshot of what the options look like on macOS and Linux.
In my case, I can pick between bash
, zsh
and tmux
.
After you make the selection, close your terminal by clicking on the trash bin icon at the top right corner.
You can also use the Command Palette to open your new default terminal.
Ctrl
+ Shift
+ P
on Windows and Linux.Command
+ Shift
+ P
on macOS.F1
to open the Command Palette.For example, I've selected Power Shell as my default shell.
The same approach can be used to select Git Bash as your default shell.
When you use this approach, you always have to completely close the terminal by clicking on the trash bin icon and reopening it for the changes to apply.
An alternative approach is to use the Launch Profile icon next to the name of the currently active terminal.
Click on Select Default Profile after clicking on the arrow that points downwards.
Then select your preferred shell from the list.
Even when using this approach, you will most likely have to close the terminal by clicking on the trash bin icon and reopening it to see the changes applied.
You can also issue a command directly in your terminal to switch between different shells.
Here are some examples of commands.
cmd
- switch to Command Prompt.powershell
- switch to Power Shell.bash
- switch to bash or Git Bash (depending on your operating system).node
- start the Node.js interpreter.python
- start the Python interpreter.py
- start the Python interpreter (Windows-specific).python3
- start the Python interpreter (macOS and Linux specific).You can issue these commands directly in your active terminal session.
You can also use the settings UI to set your default terminal.
Ctrl
+ Shift
+ P
(or Command
+ Shift
+ P
on macOS).F1
to open the Command Palette.You can also open the settings screen by pressing Ctrl
+ ,
on Windows and
Linux or Cmd
+ ,
on macOS.
You will see 3 available settings:
Click on the dropdown icon that applies to you and select your preferred shell.
By default, the setting is set to null
.
This means that VS Code automatically tries to detect the default shell that is used.
After you make the selection, close your terminal by clicking on the trash bin icon at the top right corner.
Then reopen the terminal and the change will be applied.
You can learn more about the related topics by checking out the following tutorials: