Ubuntu on Windows as VS Code terminal - executable path

会有一股神秘感。 提交于 2019-12-04 15:23:43

If you have multiple distros installed, you can read this how to launch one individually.

https://msdn.microsoft.com/en-us/commandline/wsl/wsl-config

However if you only have 1 installed, it will pick that one by default

There are three ways to launch and run WSL:

wsl.exe or bash.exe
wsl -c [command] or bash -c [command]
[distro] ie ubuntu -- this is the same as launching the installed app from the Windows menu.

In the first two cases, WSL must pick a distribution to run - a default distribution. If you don't explicitly set a default, it will be the first one installed.

So you can continue to simply use bash.exe

  1. Open VSCode Settings Ctrl + , or File > Prefrences > Settings
  2. User Settings will open up. Add the following in that file:

    "terminal.integrated.shell.windows": "C:\Windows\System32\bash.exe"

  3. Save and close the user settings file.

  4. Enjoy bash in VSCode!
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!