欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 文旅 > 旅游 > 【wsl2】从C盘迁移到G盘

【wsl2】从C盘迁移到G盘

2024/10/24 14:24:10 来源:https://blog.csdn.net/commshare/article/details/141717001  浏览:    关键词:【wsl2】从C盘迁移到G盘

  • 参考大神

C盘的ubuntu22.04 非常大,高达30g+

  • 迁移后就只有几百M了:

在这里插入图片描述

右键有一个move没有敢尝试

在这里插入图片描述


迁移过程

在这里插入图片描述

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindowsPS C:\Users\zhangbin> wsl --shutdown
PS C:\Users\zhangbin> wsl --export ^C
PS C:\Users\zhangbin> wsl -l -vNAME            STATE           VERSION
* Ubuntu-22.04    Stopped         2CentOS7         Stopped         2
PS C:\Users\zhangbin> wsl -export Ubuntu-22.04 G:\ubuntu2204.tar
Invalid command line argument: -export
Please use 'wsl.exe --help' to get a list of supported arguments.
PS C:\Users\zhangbin> wsl --export Ubuntu-22.04 G:\ubuntu2204.tar
Export in progress, this may take a few minutes.
The operation completed successfully.
PS C:\Users\zhangbin> wsl --unregister Ubuntu-22.04
Unregistering.
The operation completed successfully.
PS C:\Users\zhangbin> wsl -l -vNAME       STATE           VERSION
* CentOS7    Stopped         2
PS C:\Users\zhangbin> wsl --input Ubuntu-22.04 G:\WSL-SYS\Ubuntu-22.04 G:\WSL-SYS\Ubuntu-22.04.tar --version 2
Invalid command line argument: --input
Please use 'wsl.exe --help' to get a list of supported arguments.
PS C:\Users\zhangbin> wsl --imput Ubuntu-22.04 G:\WSL-SYS\Ubuntu-22.04 G:\WSL-SYS\Ubuntu-22.04.tar --version 2
Invalid command line argument: --imput
Please use 'wsl.exe --help' to get a list of supported arguments.
PS C:\Users\zhangbin> wsl --import Ubuntu-22.04 G:\WSL-SYS\Ubuntu-22.04 G:\WSL-SYS\Ubuntu-22.04.tar --version 2
The system cannot find the file specified.
Error code: Wsl/ERROR_FILE_NOT_FOUND
PS C:\Users\zhangbin> wsl --import Ubuntu-22.04 G:\WSL-SYS\Ubuntu-22.04 G:\WSL-SYS\ubuntu2204.tar --version 2
Import in progress, this may take a few minutes.
The operation completed successfully.
PS C:\Users\zhangbin>
  • 然后点开就能用了:

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com