Tuesday, July 29, 2025How to move WSL file system to another drive
Keven Client A. Cataluña @LinkedIn
Introduction

This 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)
    wsl --shutdown
  
2. Navigate to the WSL directory C:\Users\Development\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04LTS_79rhkp1fndgsc 3. Move the LocalState directory to another drive
C:\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 junction
C:\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