安装步骤
- 命令行打开 powershell
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
- 查看系统是否符合WSL2的需要
打开powershell, 运行systeminfo
查看 OS版本信息是否满足要求 - 启用 虚拟机feature
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
- 重启
- 更新linux kernel
- 下载最新安装包 下载地址
- 运行更新程序
- 安装需要的linux发行版
- 设置一个发行版的WSL支持版本
wsl --set-version <distribution name> <version number>
- 查看每一个发行版的WSL支持版本
wsl -l -v