Files
nexus/wiki/entities/WSL2.md
2026-04-28 16:03:03 +08:00

1.4 KiB
Raw Blame History

title, type, tags, sources, last_updated
title type tags sources last_updated
WSL2 entity
wsl2-启动与网络配置指南
install-wsl
2026-04-17

基本信息

说明

WSL2 是 Microsoft 官方提供的 Windows 内置 Linux 运行环境,基于完整 Linux 内核WSL1 为翻译层),默认使用 NAT 网络模式。Windows 10/11 Build 19041+ 可通过 wsl --install 一键安装。

核心特性

  • 完整 Linux 内核WSL2 使用真实 Linux 内核,支持系统调用兼容
  • NAT 网络模式(默认)WSL2 有独立 IP与 Windows 主机网络隔离
  • 镜像网络模式(推荐):通过 .wslconfig 配置 networkingMode=mirrored + dnsTunneling=true 使 WSL2 与 Windows 共享网络堆栈
  • 跨文件系统Windows 驱动器挂载在 /mnt/c/

相关工具

  • uvPython 包管理工具,可通过 ghproxy.com 镜像加速安装
  • Hermes Agent:可通过 ghproxy.com 镜像地址安装

来源

Connections

  • WSL2 ← depends_on ← Install WSL(先安装后配置)
  • WSL2 ← uses ← ghproxy(通过反向代理加速下载)
  • WSL2 ← related_to ← Ubuntu Server(均为 Linux 环境WSL2 面向桌面开发Ubuntu Server 面向无头服务器)