Auto-sync: 2026-04-18 16:02
This commit is contained in:
33
wiki/concepts/WSL2.md
Normal file
33
wiki/concepts/WSL2.md
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
title: WSL2
|
||||
type: concept
|
||||
tags: [windows, linux, subsystem]
|
||||
---
|
||||
|
||||
## Definition
|
||||
Windows Subsystem for Linux 2(WSL2)是 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]]
|
||||
Reference in New Issue
Block a user