Windows命令行开启WSL2

发布时间 2023-07-31 11:18:14作者: 护发师兄

Windows命令行开启WSL2

打开带管理员权限的终端(powershell)

依次输入以下四条命令并重启

wsl --install
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