What is the difference between Windows Subsystem for Linux and bash on Ubuntu on Windows?
Solution 1:
"Bash on Ubuntu on Windows" is based on Windows Subsystem for Linux. WSL is an implementation of Linux system calls on the Windows' NT kernel, which allows you to run Linux executables unmodified (like Wine does for Ubuntu). "Bash on Ubuntu on Windows" is just one application of WSL. Other Linux distros like openSUSE or Fedora are either available or will soon be available.
There are "exe"s for WSL. Originally there used to bash.exe
, then came wsl.exe
, and now there's ubuntu.exe
and openSUSE-42.exe
. Presumably fedora.exe
will appear soon. From the MSDN post Manage multiple Linux Distributions in WSL:
There are three ways to launch and run WSL:
wsl.exe
orbash.exe
wsl -c [command]
orbash -c [command]
[distro]
, i.e.,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.
Where the files for WSL are will depend on the distro, now that they are apps installed from the store:
Each distribution you install through the store is installed to that application's appdata directory. For example:
C:\Users\<username>\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState