安装WSL2#
运行安装命令#
打开Powershell,运行如下两条命令
powershell
LINES
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2重启电脑#
应用相关更改
安装想要的子系统#
查看所有系统选项#
text
LINES
wsl --list --online 
我们这里选择Ubuntu-24.04
安装Ubuntu-24.04#
powershell
LINES
wsl --install Ubuntu-24.04 
进行用户名以及密码设置#

成功进入Shell#

迁移Ubuntu至新盘#
在E盘创建文件夹#
此处以E:\WSL\Ubuntu-24.04为例

运行导出命令#
powershell
LINES
wsl --export Ubuntu-24.04 D:\WSL\Ubuntu-24.04\Ubuntu-24.04.tar
取消注册原有的 Ubuntu-24.04#
powershell
LINES
wsl --unregister Ubuntu-24.04重新导入Ubuntu-24.04#
powershell
LINES
wsl --import Ubuntu-24.04 E:\WSL\Ubuntu-24.04 E:\WSL\Ubuntu-24.04\Ubuntu-24.04.tar --version 2
https://cmy.homes/register?aff=HBVX
建议您试试草莓云机场,可以流畅观看youtube和tiktok,上reddit/x也没有问题,还有各种ai优化节点。