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

1.4 KiB
Raw Blame History

title, type, tags, last_updated
title type tags last_updated
WSL concept
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

Wiki Connections