Windows Subsystem for Linux
软件描述
Linux 子系统(WSL)是 Windows 10 的一项新功能,它允许您直接在 Windows 上运行原生的 Linux 命令行工具。
官方网站
访问软件的官方网站了解更多信息
learn.microsoft.com
安全链接HTTPS
什么是 Windows Subsystem for Linux?
Windows 子系统 for Linux(WSL)是 Windows 的一项功能,使开发者能够在无需单独虚拟机或双系统启动的情况下运行 Linux 环境。WSL 有两个版本:WSL 1 和 WSL 2。WSL 1 首次发布于 2016 年 8 月 2 日,它通过在 Windows 内核上实现 Linux 系统调用,作为兼容层运行 Linux 二进制可执行文件(ELF 格式)。WSL 1 可在 Windows 10、Windows 10 LTSB/LTSC、Windows 11、Windows Server 2016、Windows Server 2019 和 Windows Server 2022 上使用。
2019 年 5 月,WSL 2 正式推出,引入了重要变更,例如通过 Hyper-V 的部分功能实现真正的 Linux 内核。与 WSL 1 不同,WSL 2 在一个受管理的虚拟机中运行,该虚拟机实现了完整的 Linux 内核。因此,WSL 2 比 WSL 1 兼容更多的 Linux 二进制文件,因为 WSL 1 并未实现所有系统调用。自 2019 年 6 月起,Windows 10 用户可通过 Windows 内测计划(Windows Insider Program)获得 WSL 2,包括家庭版。WSL 默认并非对所有 Windows 10 用户开放,用户可通过加入 Windows 内测计划或手动安装方式来获取。