IntroductionThis guide outlines how to move the WSL file system to another drive by shutting down WSL, relocating the LocalState
directory, and configuring a directory junction for seamless integration.
Steps1. Shutdown the WSL from PowerShell (Run as Administrator)2. Navigate to the WSL directory C:\Users\Development\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04LTS_79rhkp1fndgsc
3. Move the LocalState
directory to another driveC:\Users\Development\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04LTS_79rhkp1fndgsc
move LocalState D:WSLUbuntu-20.04
C:\Users\Development\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04LTS_79rhkp1fndgsc
D:\WSL\Ubuntu-20.04
4. Create a directory junctionC:\Users\Development\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04LTS_79rhkp1fndgsc
mklink /J LocalState D:WSLUbuntu-20.04LocalState
Junction created for LocalState <<===>> D:WSLUbuntu-20.04LocalState
C:\Users\Development\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04LTS_79rhkp1fndgsc 