Files
nexus/wiki/concepts/WSL.md
2026-04-18 16:02:38 +08:00

40 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
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]]