WSL2及Linux离线安装

1762269499-WSL-2-830x400

WSL 2(Windows Subsystem for Linux 2)是微软为 Windows 10 及以上系统开发的Linux 子系统技术,核心目标是让用户在不安装虚拟机、不重启系统的前提下,直接在 Windows 环境中运行完整的 Linux 内核和 Linux 应用,实现 Windows 与 Linux 的无缝协同。

安装或升级命令:

wsl --install
wsl --upgrade

其它命令:

# 关闭
wsl --shutdown

github:

https://github.com/microsoft/WSL

版本下载地址json:

https://raw.githubusercontent.com/microsoft/WSL/master/distributions/DistributionInfo.json

ubuntu 22.04 最小镜像:

https://cloud-images.ubuntu.com/minimal/releases/jammy/release/ubuntu-22.04-minimal-cloudimg-amd64-root.tar.xz

手动导入:

wsl --import Ubuntu-Minimal %CONTAINTER_HOME%\data ubuntu-22.04-minimal-cloudimg-amd64-root.tar.xz --version 2

镜像文件导入直接使用:

wsl --import-in-place podman-machine-default "D:\VM\WSL\podman-machine-default\ext4.vhdx"

取消wsl代理:

unset http_proxy https_proxy all_proxy
# 若配置了 git 代理,取消 git 代理
git config --global --unset http.proxy
git config --global --unset https.proxy

https://github.com/microsoft/WSL

离线安装包下载:

 
夸克网盘提取码:Adhr

参考:

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享