Files
nexus/wiki/sources/install-wsl.md
2026-04-24 00:03:01 +08:00

3.4 KiB
Raw Blame History

title, type, tags, date
title type tags date
Install WSL source
2026-04-18

Source File

Summary用中文描述

  • 核心主题Windows Subsystem for LinuxWSL的官方安装与配置完整指南
  • 问题域Windows 10/11 系统上快速安装 Linux 开发环境,包括单命令安装、多发行版支持、版本管理、离线安装等场景
  • 方法/机制:① wsl --install 一键安装;② -d 参数切换默认发行版;③ wsl.exe --set-default-version 切换 WSL 1/2④ MSI 包 + DISM 命令离线安装;⑤ Windows Terminal / 开始菜单 / PowerShell 多入口运行
  • 结论/价值微软官方权威安装文档提供从零到生产可用的完整路径WSL2 为默认版本,支持并行运行多个不同 Linux 发行版

Key Claims用中文描述

  • wsl --install 一条命令完成 WSL 全部组件启用和 Ubuntu 默认发行版安装,适用于 Windows 10 version 2004+Build 19041+)和 Windows 11
  • WSL2 默认使用 NAT 网络模式,通过 .wslconfig 配置 networkingMode=mirrored 可实现与 Windows 共享网络堆栈(参考 WSL2 启动与网络配置指南
  • 支持并行安装多个 Linux 发行版Ubuntu/Debian/SUSE/Kali/Fedora 等),可从 Microsoft Store 下载或导入自定义 TAR 分发版
  • 新安装的 Linux 发行版默认使用 WSL 2可通过 wsl.exe --set-version <Distro> 1 降级到 WSL 1
  • 离线安装需从 GitHub releases 下载 MSI 安装包,并通过 DISM 命令启用 Virtual Machine Platform 组件

Key Quotes

"You can now install everything you need to run WSL with a single command." — 微软官方文档 "New Linux installations, installed using the wsl --install command, will be set to WSL 2 by default." — 微软官方文档

Key Concepts

  • WSL2Windows Subsystem for Linux 2Windows 10/11 内置 Linux 虚拟机环境,默认版本,支持完整 Linux 内核
  • WSL1WSL 第一代,基于翻译层,性能较差但兼容性好,新发行版默认不使用
  • WSL 安装命令wsl --install 单命令安装,启用所需功能并安装默认 Ubuntu 发行版
  • 多发行版支持WSL 支持并行安装运行多个不同 Linux 发行版,可通过 --distribution 参数指定运行哪个
  • 离线安装:通过 MSI 包 + DISM 命令手动启用 Virtual Machine Platform 组件,适用于无法联网的环境

Key Entities

  • MicrosoftWSL 官方文档发布方
  • UbuntuWSL 默认安装的 Linux 发行版
  • PowerShellWindows 命令行环境,执行 wsl --install 的工具(需管理员模式)
  • Windows Terminal:微软官方终端应用,推荐用于运行 WSL支持多标签页

Connections

Contradictions