Use ZSH Shell as Integrated Terminal in Visual Studio Code

I have migrated to ZSH shell long ago, and never looked back. It was weird when I opened up and saw the normal shell in VS Code.


Update: 10th April 2022

As mentioned by Jeffrey Thomas in the comments, this post is now out of date. The correct configuration is now:

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

For anyone who's trying to get this working on Mac with M1 chip, please check out Setting up ZSH with VS Code on Apple silicon Mac (M1 chip).


It took me a while to figure it out, but it was as simple as this one line change in the settings.

"terminal.integrated.shell.osx": "/bin/zsh"

Instructions

1. Find the setting

Open up VS Code Settings, then search for terminal.integrated.shell.osx, terminal.integrated.shell.linux or terminal.integrated.shell.windows depending on your platform.

2. Copy it over to User Settings

Note: Make sure you have User Settings selected. Workspace Settings only apply to the current folder or project. Whereas User Settings will change the default behaviour everywhere.

After searching the above string, you should see the filtered list showing the relevant settings. If you hover over the line then there’s a pencil (edit) button. Click on the button and select copy to settings.

3. Update the setting

After copying it over, change /bin/sh to /bin/zsh or whatever shell you prefer to use.

Buy Me A Coffee