下載適用於 x64 計算機的最新 WSL2 Linux 內核更新包
https://docs.microsoft.com/zh-cn/windows/wsl/wsl2-kernel
啟用“適用於 Linux 的 Windows 子系統”可選功能
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
啟用“虛擬機平台”可選功能
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
將 WSL 2 設置為默認版本
wsl --set-default-version 2
安裝所選的 Linux 分發版
打開 Microsoft Store,並選擇你偏好的 Linux 分發版
Ubuntu 16.04 LTS
Ubuntu 18.04 LTS
openSUSE Leap 15.1
SUSE Linux Enterprise Server 12 SP5
SUSE Linux Enterprise Server 15 SP1
Kali Linux
Debian GNU/Linux
Fedora Remix for WSL
Pengwin
Pengwin Enterprise
Alpine WSL
參考鏈接
https://docs.microsoft.com/zh-cn/windows/wsl/install-win10#update-to-wsl-2
https://www.cnblogs.com/SunSpring/p/13468253.html