解决:Docker Desktop Unexpected WSL error

1、Windows中WSL2(子系统)安装前提条件

版本:win10专业版

对于 x64 系统:版本 1903 或更高版本,采用 内部版本 18362 或更高版本。

低于 18362 的版本不支持 WSL 2。 使用 Windows Update 助手更新 Windows 版本

2、 Windows中WSL2(子系统)安装步骤(默认安装C盘)

  • 以管理员权限运行 powershell

  • 启用Windows10子系统功能,再打开的powershell窗口中输入如下命令:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
  • 启用虚拟机平台功能,再打开的powershell窗口中输入如下命令:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  • 重启电脑
  • 下载 Linux 内核更新包(适用于 x64 计算机的 WSL2 Linux 内核更新包)
  • 将 WSL 2 设置为默认版本,再打开的powershell窗口中输入如下命令:
wsl --set-default-version 2

原文地址:http://zhangshiyu.com/post/58662.html

猜你喜欢

转载自blog.csdn.net/weixin_43824520/article/details/132433511