先离线安装wsl2 Releases · microsoft/WSL 在Assets,选择对应版本 如:wsl.2.6.1.0.x64.msi,双击安装后可能需要重启。
WSL 上的 Docker 容器入门 | Microsoft Learn
vscode去进行适当的修改
在进行安装时提示
wsl: 检测到 localhost 代理配置,但未镜像到 WSL。NAT 模式下的 WSL 不支持 localhost 代理。
在 C:\Users\<你的用户名>\.wslconfig 中添加或修改以下内容(如果没有此文件,创建即可):
[experimental]
autoMemoryReclaim=gradual
networkingMode=mirrored
dnsTunneling=true
firewall=true
autoProxy=true
最后选择从应用商店直接安装ubantu

lsb_release -a
浙公网安备 33010602011771号