美文网首页
win10 安装 wsl2

win10 安装 wsl2

作者: 何家小富富 | 来源:发表于2022-08-29 11:01 被阅读0次

参考:
Windows10基于WSL2的Ubuntu子系统安装
WSL 2 需要更新其内核组件
适用于 Linux 的 Windows 子系统安装指南

1. win10 系统版本要求:

Windows10版本2004且内部版本高于19041。

win10 系统升级(win10)

更新win10

2. 开启wsl

wsl 升级到wsl2

微软商店安装 windows terminal

3. 微软商店安装ubuntu


win10 wsl2 Ubuntu 然后安装 docker

安装好wsl2、ubuntu 后,前往 docker 官网 里面有两个选择


 WSL 2 backend[](https://docs.docker.com/docker-for-windows/install/#wsl-2-backend)

*   Windows 10 64-bit: Home, Pro, Enterprise, or Education, version 1903 (Build 18362 or higher).
*   Enable the WSL 2 feature on Windows. For detailed instructions, refer to the [Microsoft documentation](https://docs.microsoft.com/en-us/windows/wsl/install-win10).
*   The following hardware prerequisites are required to successfully run WSL 2 on Windows 10:

    *   64-bit processor with [Second Level Address Translation (SLAT)](https://en.wikipedia.org/wiki/Second_Level_Address_Translation)
    *   4GB system RAM
    *   BIOS-level hardware virtualization support must be enabled in the BIOS settings. For more information, see [Virtualization](https://docs.docker.com/docker-for-windows/troubleshoot/#virtualization-must-be-enabled).
*   Download and install the [Linux kernel update package](https://docs.microsoft.com/windows/wsl/wsl2-kernel).

或者

Hyper-V backend and Windows containers[](https://docs.docker.com/docker-for-windows/install/#hyper-v-backend-and-windows-containers)

*   Windows 10 64-bit: Pro, Enterprise, or Education (Build 17134 or higher).

    For Windows 10 Home, see [System requirements for WSL 2 backend](https://docs.docker.com/docker-for-windows/install/#system-requirements-for-wsl-2-backend).

*   Hyper-V and Containers Windows features must be enabled.
*   The following hardware prerequisites are required to successfully run Client Hyper-V on Windows 10:

    *   64 bit processor with [Second Level Address Translation (SLAT)](https://en.wikipedia.org/wiki/Second_Level_Address_Translation)
    *   4GB system RAM
    *   BIOS-level hardware virtualization support must be enabled in the BIOS settings. For more information, see [Virtualization](https://docs.docker.com/docker-for-windows/troubleshoot/#virtualization-must-be-enabled).

1. 下载并安装好 docker for window

2. docker 设置

docker settings 勾选 Expose daemon on tcp://localhost:2375 without TLS ,然后 在 docker 的窗口就可以使用docker 命令。

相关文章

网友评论

      本文标题:win10 安装 wsl2

      本文链接:https://www.haomeiwen.com/subject/uewsdltx.html