首先按照网上其他教程正确设置共享文件夹,这里不再赘述
然后出现问题,没有共享文件夹
此时,在终端使用
vmware-hgfsclient
命令能看到共享文件夹名
但mnt/hgfs 下没有共享文件夹
解决方法:使用
sudo apt-get install open-vm-dkms
sudo mount -t vmhgfs .host:/ /mnt/hgfs
但出现错误 分别为
E: 无法定位软件包 open-vm-dkms
Error: cannot mount filesystem: No such device
第一个错误: 原因在于源的问题
改为使用
apt-get install open-vm-*
第二个错误:原因是这个命令对应源名字为:open-vm-tools
改为使用
sudo mount -t fuse.vmhgfs-fuse .host:/realdatatrans /mnt/hgfs -o allow_other
其中.host:/realdatatrans 改为 .host:/共享文件夹名 即可
此时即可在hgfs中看到共享文件
如果想让系统自动挂载 :
vi /etc/fstab:
添加:
.host:/VM_Shared /mnt/hgfs fuse.vmhgfs-fuse allow_other 0 0
即可!
网友评论