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

相关推荐
随风一样自由4 天前
【WSL+Linux】国内网络连接微软官方服务器(或GitHub)不稳定,导致下载内核或Linux发行版时超时断开如何解决?
linux·服务器·wsl
假如梵高是飞行员5 天前
WSL2 从 img 镜像文件启动特定 Linux 发行版完整指南
linux·windows·wsl
Qres8211 个月前
docker & WSL & Ubuntu安装记录
ubuntu·docker·容器·wsl
weixin_ab1 个月前
【WSL2 + PgVector 远程连接排坑记】
wsl
糖少主1 个月前
WSL中使用Beyond Compare 3/4/5作为difftool
git·wsl·beyond compare·difftool
Dontla1 个月前
修改默认wsl发行版环境后报错(wsl --set-default)(wsl别名,$PROFILE)
wsl
勤奋的大熊猫1 个月前
VS code 打开后自动提示 WSL 更新
wsl
likerhood1 个月前
WSL 下安装 Miniconda 笔记
笔记·wsl
冲上云霄的Jayden1 个月前
在 WSL 中安装 中文支持
乱码·wsl·中文支持
Dontla1 个月前
Powershell打开wsl2 Ubuntu Nano无法粘贴内容解决方法(Use Ctrl+Shift+C/V as Copy/Paste)
wsl