Install WSL2 on a Non-Default Drive
Contents
Enable the Windows Subsystem for Linux
Open PowerShell as Administrator and run:
|
|
Enable Virtual Machine feature
Open PowerShell as Administrator and run:
|
|
Restart computer then move to next step.
Download the Linux kernel update package
Download and run Latest WSL2 Linux kernel update package for x64 machines
Set WSL 2 as your default version
Open powershell and run:
|
|
Create a folder in a non-system drive
Create a folder for wsl like this: D:\WSL
Download a linux distro
Open powershell in newly created folder and run:
|
|
Alternatively, just download that linux distro using browser from distro list.
Unpack the downloaded distro
Run the following powershell commands:
|
|
Initialize linux distro
Run the following commands to initialize:
|
|
Then follow prompts to complete new user setup.