Install WSL on non-C drive

Open Powershell:

  • Run Set-Location DriveLetter: where DriveLetter is the drive where WSL will be installed
  • Then create a directory for WSL with New-Item WSL -Type Directory
  • Now set location there with Set-Location .\WSL
  • Now download the appx package with Invoke-WebRequest -Uri appx_package_url -OutFile Linux.appx -UseBasicParsing
  • Now we will unpack appx with Copy-Item .\Linux.appx .\Linux2.appx and then Rename-Item .\Linux2.appx -Newname "" and then Expand-Archive .\
  • Now Get-Childitem -Filter *.exe and you will find an .exe file named by the distro you downloaded. Run that to setup WSL you are done

List of links of wsl distros here

Leave a comment

Your email address will not be published.