type
status
date
slug
summary
tags
category
icon
password
1.关闭WSL
打开Powershell,输入:
2.导出/恢复备份
在D盘创建一个目录用来存放新的WSL,如
D:\Ubuntu_WSL
①导出备份(如命名为Ubuntu.tar)
Powershell输入:
②确定在此目录下可以看见备份Ubuntu.tar文件之后,注销原有的wsl
③将备份文件恢复到
D:\Ubuntu_WSL
中去3.恢复默认用户
Powershell输入:
Linux发行版名称 config --default-user 原本用户名
请注意,这里的发行版名称的版本号是纯数字,比如Ubuntu-22.04就是Ubuntu2204。
4.迁移完成
再次打开WSL,一切就绪。
- Author:Harvey
- URL:https://www.harvey.eu.org/article/14331efa-caec-808c-8080-cf4f799e5cb4
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!