Move WSL2 OS installation location to another location.
wsl --listwsl -t {Distro}wsl --export {Distro} "D:/{Distro}.tar" wsl --unregister {Distro}mkdir D:/WSLwsl --import {Distro} "D:/WSL/{Distro}" "D:/{Distro}.tar"wsl --set-default {Distro}$ Get-ChildItem "HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss" -Recurse
Hive: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss
Name Property
---- --------
{b43db7ed-9ac2-435b-8b9b-4b4f3 State : 1
d044f53} DistributionName : {Distro}
Version : 2
BasePath : \\?\D:\WSL\{Distro}
Flags : 15
DefaultUid : 1000- Get location of WSL from
explorer:\\wsl.localhost\{Distro} - Access Windows drive:
ls /mnt/