Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2

参考资料:
https://docs.microsoft.com/zh-cn/windows/wsl/install-win10
https://zhuanlan.zhihu.com/p/34885182
https://docs.microsoft.com/zh-cn/windows/wsl/wsl2-kernel
https://www.jianshu.com/p/01971bbab257

期间遇到了B450M主板未开启虚拟化的问题,F7进BIOS高级模式在OC栏目下找到CPU特征开启SVM Mode改成允许。

图片说明