VMware - 如何更改 ubuntu 虚拟机上共享文件夹的路径

VMware - How to change path to shared folder on ubuntu virtual machine

我在 VMware 上创建了一个共享文件夹,它安装在我的 ubuntu 虚拟机上 /mnt/hgfs/shared-folder。

相反,我想将它安装到 /path/to/my/web/directory/

我怎样才能做到这一点?

假设主机存在(即在使用 VMware 设置共享文件夹后),使用此命令挂载主机共享文件夹:

vmhgfs-fuse .host:/shared-folder /path/to/my/web/directory/

使用此命令卸载默认挂载点:

sudo umount /mnt/hgfs

/etc/init.d/vmware-tools

中有一个名为vmhgfs_mnt的变量
vmhgfs_mnt="/mnt/hgfs"

您可以将 /mnt/hgfs 更改为 /path/to/my/web/directory