Ubuntu – Where is the Linux Subsystem’s filesystem located in Windows 10?

It’s pretty clear that Windows’ 10 “host” filesystem is mounted at /mnt/c/ from “Linux” perspective of view. But is it possible to get an access to “Linux” filesystem from Windows? If so, where it is?

Solution:

The single root file system was located here until Windows 10 Fall Creators update (released in Oct. 2017):

%LOCALAPPDATA%Lxssrootfs

For example, C:UsersVigoAppDataLocalLxssrootfs

Other mount points are located one level up in the lxss directory. For example, your own home directory within Linux will be in %LOCALAPPDATA%Lxsshome.

Starting from the Fall Creators update, it is possible to install more than one instance of Linux and run them in parallel. The existing instance (a.k.a. legacy) will stay in its directory but new instances created are located under:

%LOCALAPPDATA%Packages<distribution_specific_name>_<random_string>LocalStaterootfs

For example, my Ubuntu 18.04 installation is located under the

CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc

directory.

 

Warning: Beware not to create, modify or delete files located under the lxss or distribution specific tree from Windows.

Exploring and reading files is the only harmless operation. See this Microsoft blog page for details.

Note that starting from Build 1903, there is an alternative way to access the files of a running distribution that doesn’t exhibit the previously mentioned issues.

Just use the path \wsl$<distribution_specific_name> and you’ll be able to create and modify files. The AppData is still not a supported way to access files with build 1903.