Ubuntu on Windows as VS Code terminal - executable path

Viewed 1182

There is a related question but it details the approach for WSL, in newer versions of Windows, the Linux distributions are not beta anymore and they are provided through the MS app store.

Where do I find the path to Ubuntu on Windows executable? (Not WSL.) I tried right-clicking on the icon to find Properties, but it is not there, it seems to be some special kind of a shortcut.

2 Answers

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

Related