Setup Windows Linux Subsystem 2 (WSL2) on Windows â
Open powershell as admin/
Download kernel update package from https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
Set WSL2 as default version.
wsl --set-default-version 2
Find a distro to install.
wsl --list --online
output
>wsl --list --online
The following is a list of valid distributions that can be installed.
Install using 'wsl.exe --install <Distro>'.
NAME FRIENDLY NAME
Ubuntu Ubuntu
Debian Debian GNU/Linux
kali-linux Kali Linux Rolling
Ubuntu-18.04 Ubuntu 18.04 LTS
Ubuntu-20.04 Ubuntu 20.04 LTS
Ubuntu-22.04 Ubuntu 22.04 LTS
OracleLinux_7_9 Oracle Linux 7.9
OracleLinux_8_7 Oracle Linux 8.7
OracleLinux_9_1 Oracle Linux 9.1
openSUSE-Leap-15.5 openSUSE Leap 15.5
SUSE-Linux-Enterprise-Server-15-SP4 SUSE Linux Enterprise Server 15 SP4
SUSE-Linux-Enterprise-15-SP5 SUSE Linux Enterprise 15 SP5
openSUSE-Tumbleweed openSUSE Tumbleweed
Install a distro
wsl --install Ubuntu-20.04
Restart your PC.
Mount a unformatted drive â
Open Powershell and query the physical drive.
> GET-CimInstance -query "SELECT * from Win32_DiskDrive"
DeviceID Caption Partitions Size Model
-------- ------- ---------- ---- -----
\\.\PHYSICALDRIVE0 CT2000P3PSSD8 3 2000396321280 CT2000P3PSSD8
\\.\PHYSICALDRIVE3 Generic- SD/MMC USB Device 0 Generic- SD/MMC USB Device
\\.\PHYSICALDRIVE2 Generic MassStorageClass USB Device 0 Generic MassStorageClass USB Device
\\.\PHYSICALDRIVE1 Generic MassStorageClass USB Device 0 Generic MassStorageClass USB Device
\\.\PHYSICALDRIVE5 Generic- Compact Flash USB Device 0 Generic- Compact Flash USB Device
\\.\PHYSICALDRIVE4 Generic- Micro SD USB Device 2 512706378240 Generic- Micro SD USB Device
Mount it to WSL VM.
...