Where Are WSL Distro Files Stored?
WSL2 ext4.vhdx virtual disks per distro under Packages LocalState plus the \\[wsl$] live view.
Last updated
WSL2 keeps each distro filesystem inside an ext4.vhdx virtual disk under its Packages LocalState folder. The file grows as Linux fills and never shrinks on its own.
For daily file work use the double backslash wsl$ network path instead of the vhdx. Never mount or edit the vhdx while WSL runs.
Where WSL stores this, by platform
%LOCALAPPDATA%\Packages\[DistroPackage]\LocalState\ext4.vhdx
Package name varies per distro (e.g. Canonical Ubuntu entries). Browse live files at the wsl$ share path; back up with export to tar instead.
Frequently asked questions
How do I back up a WSL distro?
Export it to a tar file with the wsl export command. Import restores it as a new distro registration.
Why is ext4.vhdx huge after deleting Linux files?
Sparse disk does not compact itself. Shut WSL down and compact the vhdx with the diskpart or Optimize-VHD flow.
Notice an outdated path? Let us know.