How to install some linux on wsl: Difference between revisions

From 清冽之泉
Jump to navigation Jump to search
Line 15: Line 15:


== 安装 ArchLinux 的方法 ==
== 安装 ArchLinux 的方法 ==
<syntaxhighlight lang="bash" line>
<syntaxhighlight lang="bash">
wsl --list --online
wsl --list --online
wsl --install -d archlinux
wsl --install -d archlinux
</syntaxhighlight>
</syntaxhighlight>

Revision as of 16:44, 6 May 2025

前置条件

  1. UEFI 中开启虚拟化支持
  2. 控制面板 - 卸载 - 启用或关闭 Windows 功能中打开“适用于 Linux 的 Windows 子系统”和“虚拟机平台”
  3. 安装新的 Linux 分发版前将 WSL 2 设置为默认版本
wsl --update
wsl --set-default-version 2

安装 Ubuntu 的方法

在 Microsoft Store 里搜索 Ubuntu 24.04.1 或以上版本,直接搜出来点“获取”就行。

安装 Debian 的方法

在 Microsoft Store 里搜索 Debian,直接搜出来点“获取”就行。

安装 ArchLinux 的方法

wsl --list --online
wsl --install -d archlinux