<p>In the latest versions [2025 WSL2], the file system is accessed from:</p>
<p># \wsl.localhost<distro name><br>
shortcut:</p>
<h1><a name="p-30136-wsldistribution-1" class="anchor" href="#p-30136-wsldistribution-1" aria-label="Heading link"></a>\wsl$<Distribution>:</h1>
<p>ex:<br>
\wsl$\Ubuntu</p>
<pre><code class="lang-auto">
Vous pouvez également find this path by starting the distro then running$ wslpath -w $HOME`
The files themselves seem to be stored within a .vhdx file in a similar location to 2020's solution.
</code></pre>
<p>%LOCALAPPDATA%\wsl<a unique uuid>\ext4.vhdx</p>
<pre><code class="lang-auto">
For older WSL2 installs [2020] it would be a file like:
</code></pre>
<p>%LOCALAPPDATA%\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\ext4.vhdx</p>
<pre><code class="lang-auto">
For example with Debian the file would be a file that is an ext4 virtual disk:
</code></pre>
<p>%LOCALAPPDATA%\Packages\YourDistroName-ID\LocalState, you can see a file named ext4.vhdx</p>
<pre><code class="lang-auto">
Vous pouvez find the exact filenames by referencing the registry, ex: powershell:
</code></pre>
<p>(Get-ChildItem HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss | ForEach-Object {Get-ItemProperty $_.PSPath}) | select DistributionName,BasePath,VhdFileName</p>
<pre><code class="lang-auto">
Also useful if a distro isn't installed in the standard directory, doesn't seem possible to get using wsl command from the invite de commandes.
Previously, in 2018, The root Linux path was related to which distribution you had installed from the Microsoft Store rather than one global path; for Ubuntu, it was located at:
</code></pre>
<p>%LOCALAPPDATA%\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs</p>
<pre><code class="lang-auto">
but with the files stored directly on the NTFS file system.</code></pre>