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

40
wiki/concepts/WSL.md Normal file
View File

@@ -0,0 +1,40 @@
---
title: "WSL"
type: concept
tags: []
last_updated: 2026-04-18
---
## Summary
- Windows Subsystem for LinuxWindows Linux 子系统Microsoft 开发的在 Windows 上运行 Linux 发行版的兼容层
- 允许开发者直接在 Windows 上使用 Linux 工具、实用程序和 Bash无需传统虚拟机或双系统启动
## Key Features
- 与 Windows 无缝集成,文件系统共享
- 支持多个 Linux 发行版Ubuntu、Debian、SUSE、Kali 等)
- 可通过 Windows Terminal 管理
- 直接调用 Windows 程序
## Versions
- WSL 1一代架构Linux 系统调用转换为 Windows API
- WSL 2二代架构使用轻量级虚拟机运行完整 Linux 内核,性能更优
## Installation
- Windows 10 2004+ 或 Windows 11使用 `wsl --install` 一键安装
- 老版本:手动安装,需启用"适用于 Linux 的 Windows 子系统"可选组件
## Commands
- `wsl --install`:一键安装(默认 Ubuntu
- `wsl -l -v`:列出已安装发行版
- `wsl --set-version <Distro> <1|2>`:设置版本
- `wsl -d <Distro>`:启动指定发行版
## Connections
- [[Ubuntu]] ← default_distro ← [[WSL]]
- [[WSL2]] ← extends ← [[WSL]]
- [[Windows Terminal]] ← manages ← [[WSL]]
- [[PowerShell]] ← invokes ← [[WSL]]
## Wiki Connections
- [[Install WSL]] → describes → [[WSL]]
- [[WSL2 启动与网络配置指南]] → describes → [[WSL2]]