首页 > 解决方案 > 如何在 WSL 中使用 Ubuntu 卸载繁忙的 windows 文件?

问题描述

我必须卸载drvfs并使用“元数据”标志重新安装它,以使用 WSL 的新文件系统功能,允许在 WSL 中更改权限。但是当我这样做时:

sudo umount /mnt/c

它返回

umount: /mnt/c: target is busy

如何在不丢失数据的情况下强制停止进程?哪个进程可以运行而不应该运行?

标签: linuxwindows-subsystem-for-linuxumount

解决方案


试试umount -l /mnt/c。根据手册页,它执行以下操作

   -l, --lazy
          Lazy unmount.  Detach the filesystem from the file hierarchy now, and clean up all references to this filesystem as soon as it is not busy anymore.

推荐阅读