Finding ubuntu file system files on Windows
I installed Ubuntu file system on my Windows 10 using this tutorial:
Now I want to find installed on Ubuntu libraries files (and add some manually).
I know that they are located in C:\Users\NAME\AppData\Local\Packages\DISTRO_FOLDER\LocalState\rootfs.
But I don't have folder rootfs there:
I can't open this .vhdx file, because I get an error:
The disk image isn’t initialized, contains partitions that aren’t recognizable, or contains volumes that haven’t been assigned drive letters. Please use the Disk Management snap-in to make sure that the disk, partitions, and volumes are in a usable state.
My question is how to get access to Ubuntu file system on my Windows 10.
11 Answer
This is a virtual disk image that contains a file system formatted as ext4. Windows doesn't know how to handle ext4 file systems natively, so there is no way to open or mount it except using the Windows Subsystem for Linux.
Moreover, even if you were using WSL 1 and could see the files in the file system, Microsoft is very clear that you are not to modify those files from Windows because doing so can and will corrupt them. Linux stores permissions and metadata in a different way than Windows does and modifying or adding files from Windows will break that functionality and likely corrupt your data.
If you need to move data between the two systems, start your Ubuntu WSL instance and use it to copy and modify the files using the standard Unix tools. That will provide the correct behavior and prevent any data corruption.