How to configure VS Code (windows) to use Ubuntu App as terminal

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 01:49:23

问题


I installed Ubuntu App on Windows 10 and I would like to use it as a terminal in VS Code. I see VS Code automatically detecting options like Git Bash, PowerShell, Cmd.exe and gives options to use them as terminal. But I would like to use Ubuntu. Is it possible?


回答1:


For specifically using Ubuntu distro you just have to type a simple command to change the default distro used by wsl to ubuntu. Type wslconfig /setdefault Ubuntu in cmd thats it.

Then in my pc vscode gave me option to choose which terminal i wanted to use so i selected wsl bash so it edited the user settings "terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\bash.exe"in Preferences->settings . The above code overrides the default setting.

Your pc may have a different path so refer to stackoverflow link to configure vscode for wsl as terminal

you can also refer to the microsoft link for wsl configuration https://docs.microsoft.com/en-us/windows/wsl/wsl-config

you can refer to similar question as yours for ubuntu and multiple distros



来源:https://stackoverflow.com/questions/47462714/how-to-configure-vs-code-windows-to-use-ubuntu-app-as-terminal

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