卸载在Mac中由sshfs挂载的目录
我已经在我的Mac中安装了OSXFUSE ,并使用sshfs来挂载一个远程目录。 现在我想卸载它,但找不到方法。 我的操作系统是OSX 10.8 Mountain。 谁能帮忙? 
 不要使用umount 。 
使用
 fusermount -u PATH 
尝试这个:
 umount -f <absolute pathname to the mount point> 
例:
 umount -f /Users/plummie/Documents/stanford 
如果这不起作用,请尝试使用与root相同的命令:
 sudo umount -f ... 
官方文档为OS X FUSE说使用umount: https : //github.com/osxfuse/osxfuse/wiki/FAQ
至less在10.11(El Capitan)中,umount的手册页显示:
由于Mac OS X的复杂性和交织性,umount可能经常失败。 build议使用diskutil(1)(如“diskutil unmount / mnt”)。
这种方法(例如,“diskutil umount path / to / mount / point ”)允许我卸载挂载sshfs的内容,而不需要sudo。 (我相信它至less可以回到10.8。)
 使用ps aux | grep sshfs  ps aux | grep sshfsfindps aux | grep sshfs的PID(这将是用户名旁边的数字) 
 然后kill -9 $PID ,如果其他解决scheme不起作用 
以下为我工作:
 hdiutil detach <path to sshfs mount> 
例:
 hdiutil detach /Users/user1/sshfs 
也可以在Finder中find由sshfs创build的卷,单击鼠标右键,然后select“popup”。 就我所知,就是上述命令的GUI版本。
 如果fusermount命令有问题, fusermount可以fusermount进程: 
ps -ax | grep“sshfs”
仅供参考,我发现这对我有用。
diskutil unmount / path / to / directory /
当我使用umount命令时,我得到了一个推荐这个diskutil命令的错误。
 sudo diskutil unmount force PATH 
 每次工作:) 
 注意force标签 
Command + Up ,一次又一次,这个磁盘将显示:
  
 
如果你知道它在哪里:
 