【wsl2】从C盘迁移到G盘

ops/2024/9/24 12:29:25/

  • 参考大神

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>
  • 然后点开就能用了:

http://www.ppmy.cn/ops/105187.html

相关文章

c++vscode多文件实现通讯录管理系统

cvscode多文件实现通讯录管理系统 作为c入门级别的实战项目,此通讯管理系统项目不仅仅是对c入门阶段学习成果的检验,也是对c基础知识的回顾,体会c在实战制作中的思路,是入门c单文件实现通讯录系统的改进 一、多文件通讯录管理系统简介 系统需…

剑侠情缘c#版(游戏源码+资源+工具+程序),百度云盘下载,大小1.68G

剑侠情缘c#版(游戏源码资源工具程序),c#开发的,喜欢研究游戏的可以下载看看。亲测可进游戏。 剑侠情缘c#版(游戏源码资源工具程序)下载地址: 通过网盘分享的文件:【游戏】剑侠情缘c#…

108页PPT分享:华为流程体系及实施方法最佳实践

PPT下载链接见文末~ 华为的流程体系、流程框架及实施方法是一个复杂而精细的系统,旨在确保公司运作的高效性和竞争力。以下是对这些方面的详细描述: 一、华为的流程体系 华为的流程体系是一套全面的管理体系,它涵盖了企业所有的活动&#…

JS设计模式之“分即是合” - 建造者模式

引言 当我们在进行软件编程时,常常会遇到需要创建复杂对象的情况。这些对象可能有多个属性,属性之间存在依赖关系,或需要按照特定的骤来创建。在这种情况下,使用建造者模式(Builder Pattern)可以提供一种活…

Android 使用原生相机Camera在预览界面进行识别二维码或者图片处理

1 项目需求 最近项目中有个需求:使用原生相机在预览界面进行识别二维码和图片处理。其实这个需求不是很难,难在对预览画面的处理过程。 自己针对这个需求写了一个工具类,便于后续进行复盘,同时也分享给有类似需求的伙伴们。 2 遇到的问题 2.1 二维码识别成功率低 使用…

postgresql数据库创建表分区和分区分区查询失效问题

postgresql数据库创建表分区和分区失效场景 一、前言二、分区表创建1、范围分区(Range Partitioning)2、列表分区(List Partitioning)3、hash分区(hash Partitioning) 三、表分区查询失效问题 一、前言 在…

C++入门基础知识10

C 标识符 C 标识符是用来标识变量、函数、类、模块,或任何其他用户自定义项目的名称。一个标识符以字母 A-Z 或 a-z 或下划线 _ 开始,后跟零个或多个字母、下划线和数字(0-9)。 C 标识符内不允许出现标点字符,比如 、&…

【C++ Primer Plus习题】8.2

问题: 解答: #include <iostream> using namespace std;typedef struct _CandyBar {string brand;float weight;int hot; }CandyBar;void fill(CandyBar& cb, const char* name"Millennium Munch", double w2.85, int h350) {cb.brand name;cb.weight w…