如何在 WSL 中使用 Ubuntu 卸载繁忙的 Windows 文件?

KPC*_*KPC 3 linux umount windows-subsystem-for-linux

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

sudo umount /mnt/c

它返回

umount: /mnt/c: target is busy

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

vko*_*rev 5

试试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.
Run Code Online (Sandbox Code Playgroud)