Auto-sync: 2026-04-18 16:02

This commit is contained in:
2026-04-18 16:02:38 +08:00
parent badd1215d7
commit e7e77ae92e
55 changed files with 3026 additions and 16 deletions

33
wiki/concepts/WSL2.md Normal file
View File

@@ -0,0 +1,33 @@
---
title: WSL2
type: concept
tags: [windows, linux, subsystem]
---
## Definition
Windows Subsystem for Linux 2WSL2是 Microsoft 提供的 Windows 10/11 上的 Linux 兼容层,基于 Hyper-V 虚拟化技术,提供完整的 Linux 内核。
## Core Features
- 真正的 Linux 内核(而非 WSL1 的翻译层)
- 系统调用兼容性大幅提升
- 性能接近原生 Linux
- 与 Windows 文件系统无缝集成
## Key Commands
- `wsl --install` — 快速安装 WSL2含 Ubuntu
- `wsl -l -v` — 查看已安装分发版及状态
- `wsl -d <分发版名称>` — 启动指定 Linux 发行版
- `wsl --shutdown` — 强制停止所有 WSL 实例
## Network Configuration
WSL2 默认使用 NAT 模式,可通过 .wslconfig 启用镜像网络模式解决代理问题。
## Aliases
- Windows Subsystem for Linux
- WSL
- WSL 2
## Related Concepts
- [[镜像网络模式]]
- [[.wslconfig]]
- [[Ubuntu]]