1.首选找一个linux系统,执行docker命令

docker run -it --rm centos:7 bash

2.开一个新窗口,将系统导出

docker export e0ee25406703 -o centos.tar

3.切换到wsl命令,导入tar包

wsl --import centos D:\wsl\centos D:\wsl\centos.tar

centos 这个是新 WSL 实例命名的名称 

D:\wsl\centos   这个是需要安装的目录里

D:\wsl\centos.tar  这个是tar包的位置

4.查看centos

wsl -l -v

GitHub 加速计划 / ws / WSL
11
0
下载
Issues found on WSL
最近提交(Master分支:5 个月前 )
8c61f09e * Add super user detection; a powershell approach is used * use the 'id' command * avoid stderr warning & wsl alias 1 天前
ae780d11 1 天前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐