There are different reasons to change WSL install directory. WSL (Windows Subsystem for Linux) can take a considerable amount of space on the system drive. One of the reason is many of the WSL users from windows 10 have a small system drive. There is a way to change the WSL installation drive after the initial installation.

WSL distros available on Windows store

To follow this tutorial you will require the following software installed:

Note: I am using Scoop for installing LxRunOffline on my pc. More details for Scoop installation can be found here: Chocolatey Open Source Alternative Scoop

  • Scoop or Chocolatey
  • LxRunOffline installed from Scoop / Chocolatey: You can install LxRunOffline via Scoop scoop bucket add extrasscoop install lxrunoffline More details can be found here: https://github.com/DDoSolitary/LxRunOffline
  • Wsl Installed from Windows store

At first, execute wsl -l command on your command prompt. you will see all of your installed wsl .

Now you can create a directory on your local drive where you want to move your WSL installation. I have added following on my local drive:

Local installation Directory

Now you can use this command to move your installation : lxrunoffline move -n <distro Name> <directory path>

For example, to change WSL install directory of ubuntu, I issued lxrunoffline move -n Ubuntu-18.04 -d d:\wsl\installed\Ubuntu-18.04 command.

It will take some time depending on image size. After lxrunoffline is done, you can execute the following command to check that the directory of wsl installation has changed.

C:\wsl> lxrunoffline get-dir -n Ubuntu-18.04
d:\wsl\installed\Ubuntu-18.04

Now you can enjoy installing multiple WSl distros without worrying about storage drive issues.

By Garnel

I like to write about Tips And Tutorials related topics and I blog about my personal interests. I am trying to learn the ways to Promote Blog. Sharing my limited knowledge with the world. Blogging about Tips, Tutorials, and Tweaks for Computers, Internet, Operating System, Windows Xp, Windows Vista, Office Applications, Gadgets, Science, and Technology. And Having Fun..

Leave a Reply

Your email address will not be published. Required fields are marked *

4 + six =