Wsl: Where is Linux installed?

Created on 17 Apr 2018  Â·  9Comments  Â·  Source: MicrosoftDocs/WSL

I have installed Ubuntu through the Windows Store, but there is nothing located at %localappdata%\lxss\ on my machine/user. Where is it located?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Most helpful comment

Thanks @pcounts ! That lead me to it. For me, the root directory rootfs was in
%userprofile%\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState
https://i.imgur.com/ZKDhddw.png

All 9 comments

Try %programfiles%\WindowsApps\CanonicalGroupLimited.UbuntuonWindows_1604.2017.922.0_x64__79rhkp1fndgsc

@mavaddat So that's where the application is installed, but what about the files I create in Linux?

image

Thanks @pcounts ! That lead me to it. For me, the root directory rootfs was in
%userprofile%\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState
https://i.imgur.com/ZKDhddw.png

Perhaps Microsoft should provide an easy way to find these files from Windows ?

They purposely don't because they don't want you manipulating Linux files with Windows until officially supported. That said, there is more ability in this arena with upcoming Spring Creator's Update due to new WSL features such as enabling metadata -o to extend Linux attributes to Windows. But until it's explicitly stated, modifying Linux files from Windows is unsupported.

The how-to linked above says as much as well.

@DarthSpock, thanks that's useful info.

BE WARNED: If you access/modify any of your Linux files using Windows apps/tools, you may well end up with corrupted files! Be sure to read this for more details: https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-not-change-linux-files-using-windows-apps-and-tools/

Was this page helpful?
0 / 5 - 0 ratings