How to connect VMWare public folders to a Linux virtual machine

While for a normal VMWare virtual machine with Windows it is sufficient to simply enable Public Folders in the settings, for a Linux virtual machine these Public Folders still need to be mounted.

We had to look for a way to do it. Google gives answers as far back as 2006, which date back to the ancient VMWare 5, so I will keep the decision taken from here.

Include Public Folders in Virtual Machine Settings as a first step.

Then we set up the Linux itself.:

sudo vmhgfs-fuse .host:/ /mnt/hgfs/ -o allow_other -o uid=1000

If no hgfs catalogue exists:

sudo vmhgfs-fuse .host:/ /mnt/ -o allow_other -o uid=1000

or simply by creating it –

sudo mkdir /mnt/hgfs

You can use a specific folder instead of .host:/. In this case you can find out the name of the folder using vmware-hgfsclient:

$ vmware-hgfsclient
$ sudo vmhgfs-fuse .host:/my-shared-folder /mnt/hgfs/ -o allow_other -o uid=1000

If you want them to be connected at startup, update /etc/fstab as follows:

# Use shared folders between VMWare guest and host
.host:/ /mnt/hgfs/ fuse.vmhgfs-fuse defaults,allow_other,uid=1000 0 0

If it does not work

It is said that the following packages must be pre-installed in the system:

sudo apt-get install open-vm-tools open-vm-tools-desktop

under another version –

sudo apt-get install build-essential module-assistant linux-headers-virtual linux-image-virtual && dpkg-reconfigure open-vm-tools

About: Morozov Dmitry

My specialisation is software engineer. I am 35 years old and have been working in the IT field for over 15 years. I have accumulated experience in programming, project management, training and administration.