14

I installed zsh in my Ubuntu 18.04 but didn't like it. After installing it I was having issues, so I removed it.

The default terminal in my VS Code has not changed back to Bash for some reason. Whenever I open the inbuilt terminal, an error message pops up:

The terminal process command '/usr/bin/zsh' failed to launch (exit code: 1)

screenshot of the error

I am just able to capture the screenshot - terminal gets automatically closed after fractions of a second.

6
  • Are you able to open a normal terminal, try doing Ctrl + Alt + T, and share results here.
    – devGeek
    Feb 13, 2019 at 9:29
  • Did you restart the IDE and or the System? Feb 13, 2019 at 9:30
  • If successful, post the output of echo $0
    – devGeek
    Feb 13, 2019 at 9:43
  • @devGeek yes I am able to open Linux terminal with keyboard commands. Feb 13, 2019 at 14:48
  • 1
    Thanks a tonne! Kudos! Apr 23, 2020 at 17:32

4 Answers 4

15

Try the following steps:

  1. In the VSC application open File>Preferences>Settings. Or press Ctrl+,;
  2. At this point you can browse the settings, or type terminal.integrated.shell.linux in the search bar;
  3. As value of the field Terminal > Integrated > Shell:Linux fill /bin/bash. Then restart the application.

enter image description here

Or, probably better, search for /bin/zsh and replace it with /bin/bash.

2
  • 1
    that solved the issue... Feb 14, 2019 at 13:28
  • In my vs code, it is not in editable mode. How to solve that?
    – chamzz.dot
    Jan 28, 2020 at 10:25
5

New and easiest way

Configure your default integrated terminal by running the Terminal: Select Default Profile command, which is also accessible via the terminal dropdown.

enter image description here

https://code.visualstudio.com/docs/editor/integrated-terminal#_terminal-profiles

5
  1. Open Preferences > Settings or simply use Ctrl + ,.
  2. Search for Terminal › Integrated › Shell: Linux.
  3. Click on Edit in settings.json.
  4. Finally add this line "terminal.integrated.shell.linux": "/bin/bash" and restart your application.
1
  • 1
    Thank you :) It worked
    – Pratik
    Mar 26, 2020 at 5:13
0

Open the file ~/.config/Code/User/settings.json and add the following line to the end of the file

"terminal.integrated.defaultProfile.linux": "bash"

Replace bash with whatever terminal flavor you fancy.

Ooops i didnt notice this answer was already given by

Maddu Swaroop . Credits to him though i had to find my own despite it was there.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .