Anyone who’s used VMware at a desktop level for a while has likely run into the need to share a file from the guest operating system back to the host operating system.
This post will cover options for Debian derivatives which include Ubuntu.
Make sure you have enabled the file share in your VMware virtual machine settings.
Now, you now have two options.
The first (and not covered in this post) is to install the VMware native tools software. While this is possible (there are lots of guides) this will have to be redone each time you update your kernel; this can happen pretty often now-a-days.
Unless you have other reasons to use VMware specific tools, you will likely get equivalent mileage out of the open-vm-tools packages which is the second option.
For a desktop environment I tend to install the following packages to cover the bases…
apt-get install open-vm-tools open-vm-tools-desktop open-vm-tools-dkms
This will get you the base package and you should probably reboot for good measure after this, especially if you just enabled file sharing for the virtual machine.
Once back up, you have two steps to get access to your shared folder.
1. Create the mount point path
mkdir -p /mnt/hgfs/yoursharename
2. Mount the share
vmhgfs-fuse .host:yoursharename /mnt/hgfs/yoursharename
You should now be able to browse to, or cd to your mounted share folder.
Troubleshooting – Did you do this as root? 😉
Troubleshooting – This method will not persist through reboot.