巨硬官方文档:https://learn.microsoft.com/en-us/windows/wsl/install-on-server
一条命令直接搞定
wsl --install
中间可能提示选择版本
列出所有版本
wsl -l -o
用wsl –install -d <发行版>选择安装的版本例如
wsl --install -d Ubuntu-22.04
若出现错误代码0x8000ffff
更新wsl
wsl --update
开始安装
之后设置用户名及密码,安装成功,可能需要重启
参考链接
https://developer.aliyun.com/article/1315303
https://blog.csdn.net/u013250861/article/details/128856993
https://zhuanlan.zhihu.com/p/640621418
https://raw.githubusercontent.com/microsoft/WSL/master/distributions/DistributionInfo.json