赞
踩
以指定用户运行wsl wsl -u root
。
首先扩展硬盘微软官方这篇文章写的很详细,我就不在赘述了:扩展 WSL 2 虚拟硬盘的大小
压缩硬盘
压缩操作如下:
fstrim -a
。wsl shutdown
,关闭wsl。compact vdisk
。等待其完成,即可。参考文章:
1、WSL2 distro rapidly expands to fill drive without using space and cannot be shrunk #8226
2、WSL 的基本命令
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。