WSL-Ubuntu安装
如何xxx
#type / howto
#status / evergreen
[!info] related notes wsl
WSL-Ubuntu安装
使用指南
下载安装 wsl 服务
Windows 下 win 键打开搜索栏,搜索 wsl,点击打开就能自动下载
下载完双击只是启动 wsl 服务
下载 wsl 镜像
wsl 命令行
使用“wsl.exe --list --online' ”列出可用的分发
和 “wsl.exe --install <Distro>” 进行安装。
微软官网(好像Microsoft Store 也行)旧版 WSL 的手动安装步骤 | Microsoft Learn
使用国内镜像源下载(推荐)
清华大学开源软件镜像站 | Tsinghua Open Source Mirror
当时下载的文件直达: ubuntu-24.04.3-wsl-amd64.wsl
下载完后双击打开
正在安装: C:\wsl\ubuntu-24.04.3-wsl-amd64.wsl
已成功安装分发。可以通过 “wsl.exe -d Ubuntu-24.04” 启动它==]
正在启动 Ubuntu-24.04...
wsl: 检测到 localhost 代理配置,但未镜像到 WSL。NAT 模式下的 WSL 不支持 localhost 代理。
Provisioning the new WSL instance Ubuntu-24.04
This might take a while...
Create a default Unix user account: alexander
New password:
Retype new password:
passwd: password updated successfully
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
alexander@LAPTOP-RS6OFKUJ:/mnt/c/wsl$
速度快的一
实战经验
wsl —install 没反应,一段时间后报错
按任意键修复即可
wsl: WSL 安装似乎已损坏 (错误代码: Wsl/CallMsi/Install/REGDB_E_CLASSNOTREG)。
按任意键修复 WSL,或 CTRL-C 取消。
此提示将在 60 秒后超时。
没有注册类
错误代码: Wsl/CallMsi/Install/REGDB_E_CLASSNOTREG