Ack- No! Regarding the comment and your corresponding self-answer, please never access files directly through
%LOCALAPPDATA%\Packages\TheDebianProject.DebianGNULinux_76v4gfsz19hv4\LocalState\rootfs. While it is true that, for WSL1, the files are stored there by WSL, accessing them directly can cause WSL corruption. Also note that for WSL2, the files are inside a virtual HDD (
ext4.vhdx), so it prevents you from using this technique at all.
To quote Microsoft's DevBlog on the topic:
There is one hard-and-fast rule when it comes to WSL on Windows:
DO NOT, under ANY circumstances, access, create, and/or modify Linux files inside of your
%LOCALAPPDATA% folder using Windows apps, tools, scripts, consoles, etc.
Opening files using some Windows tools may read-lock the opened files and/or folders, preventing updates to file contents and/or metadata, > essentially resulting in corrupted files/folders.
Creating/changing Linux files in your Appdata folder from Windows will likely result in data corruption and/or damage your Linux environment requiring you to uninstall & reinstall your distro!
The correct answer is also found in that page. WSL provides a
\\wsl$\<distroname> pseudo-network-share that will allow you to safely access the WSL filesystem from Windows. Note that the WSL instance does need to be running in order to show up in