Skip to content

WSL2 安装 ubuntu

1. 安装 WSL2

  1. 打开 powershell,输入以下命令:

    powershell
    dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
  2. 输入以下命令,启用虚拟机平台:

    powershell
    dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  3. 重启电脑。

2. 安装 ubuntu

  1. 打开 Microsoft Store,搜索 ubuntu,点击获取。

  2. 获取完成后,点击安装。

  3. 安装完成后,点击启动。

  4. 输入用户名和密码,点击登录。

3. 安装 wsl2 内核更新包

  1. 打开 Microsoft Store,搜索 wsl2 内核更新包,点击获取。

  2. 获取完成后,点击安装。