【自用】vmware workstation建立主机window与虚拟机ubuntu之间的共享文件夹

1.在windows中建立1个文件夹

在vmware中设置为共享文件夹
参考博文:
https://zhuanlan.zhihu.com/p/650638983

2.解决:

(1)fuse: mountpoint is not empty
(2)普通用户也能使用共享目录
参考博文:
https://blog.csdn.net/zhanglingge/article/details/113916057

vmhgfs-fuse .host:/ /mnt/hgfs -o nonempty -o allow_other

3.设置ubuntu重启后自动挂载

参考博文:
https://blog.csdn.net/qq_45871852/article/details/123139862
(该博文的最后面讲的)
打开/etc/fstab:

sudo gedit /etc/fstab

在最后面添加代码:

.host:/share /mnt/hgfs fuse.vmhgfs-fuse allow_other 0 0

(我的共享文件夹名称是share,注意share后,/mnt前有一个空格。)

结果如下:
(ubuntu路径中看不到share文件夹了,直接是share内部的内容。)
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/lyc_daniel/article/details/134168492
今日推荐