wsl2 windows 安装

依赖环境

启用WSL及虚拟机

复制代码
# 启用WSL功能
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
 
# 启用虚拟机平台(WSL2依赖)
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

或者在程序和功能中开启

确保上面三个都开启

2.更新

使用下面命令更新

复制代码
wsl --update

我电脑更新会有问题,也可以直接下载最新程序进行安装https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi

如果还有问题,可尝试重置 winsock

复制代码
netsh winsock reset

版本操作及发行版本安装

设置版本

复制代码
wsl --set-default-version 2

下载离线包

https://cloud.tencent.com/developer/tools/blog-entry?target=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fwindows%2Fwsl%2Finstall-manual%23downloading-distributions&objectId=2487510&objectType=1&contentType=undefined

AppStore 中的会默认安装到c盘 推荐下载离线包

.AppxBundle安装包改名为zip文件,解压,找到文件名包含x64的.appx文件,再次改名为.zip文件, 解压到D盘比较好找的目录,如D:\Ubuntu 点击ubuntu.exe安装.

参考链接

https://blog.csdn.net/micreat/article/details/154502968

https://blog.csdn.net/qq_34459334/article/details/154983984

相关推荐
Irene19911 天前
WSL 切换磁盘后验证完整性(MobaXterm、Powershell、WSL 的区别)
linux·wsl·mobaxterm
糖梨4 天前
Windows 下 Cursor 变量跳转的 WSL2 + clangd 方案 —— 跨平台 Linux C++ 开发环境搭建踩坑实录
c++·跨平台·wsl·clangd·cursor
lcreek4 天前
Kali Linux WSL 中文输入法完整安装指南
linux·wsl·中文输入法
lcreek4 天前
Kali Linux WSL 从零安装 XFCE4 桌面完整指南
linux·wsl
冲上云霄的Jayden5 天前
在 WSL 中安装 Google Chrome 浏览器
chrome·wsl
wj3055853789 天前
课程 1:WSL + uv + ComfyUI 环境选择说明
python·wsl·cuda·uv·comfyui
IceSugarJJ9 天前
Windows下VSCode+ WSL项目启动流程
linux·windows·vscode·ubuntu·wsl
chen_22710 天前
windows系统安装wsl
windows·wsl
小猪写代码10 天前
拓:论 WSL 和 VMware
wsl·虚拟机
Irene199111 天前
在 WSL 中下载安装 MySQL,连接到 SQLyog(MySQL 安装在 WSL vs Windows 本地对比)
mysql·wsl