how to configure VSCode to use oh-my-zsh in Ubuntu 18.04?

Viewed 10674

I am trying to configure oh-my-zsh as integrated terminal for my vscode.

Bellow is my user configuration

{
    "editor.fontSize": 12,
    "editor.tabSize": 2,
    "editor.wordWrap": "on",
    "editor.minimap.enabled": false,
    "workbench.iconTheme": "vscode-icons",
    "terminal.integrated.fontSize": 12,
    "window.zoomLevel": 0,
    "vsicons.dontShowNewVersionMessage": true,
    "terminal.integrated.shell.linux": "/bin/zsh"
} 

But whenever I try to open integrated terminal it throws an error saying The terminal process command '/bin/zsh' failed to launch (exit

OS : Ubuntu 18.04
VSCode : 1.26.1

Output of echo $SHELL is /bin/zsh

I also tried with value zsh and /usr/bin/zsh but got the same error.

The same works for /bin/bash

What else I need to do?

2 Answers

to solve your problem, run the command in your terminal

which zsh

Then in VSC , replace the

"terminal.integrated.shell.linux": "/bin/zsh" with

"terminal.integrated.shell.linux": "{the location your terminal pointed to}"

In Windows Subsystem for Linux (WSL) do:

  1. Start VSCode
  2. Press F1
  3. Type user settings
  4. click on button open settings json
  5. Edit or add the lines:
"terminal.integrated.shell.osx": "/usr/local/bin/zsh",
"terminal.integrated.shellArgs.windows": [
    "-c",
    "zsh"
],
  1. Restart VSCode
Related