How to Share Folders Between an Ubuntu Guest and Host Machine in VMware

Tutorial Dec 02, 2020

A simple guide on how to share folders between an Ubuntu guest OS running on VMware Workstation Player and the host OS.

VMware Workstation Player, formerly known as "VMware Player" is a hypervisor for creating Virtual Machines on computer systems running on Windows or Linux. Even though it lacks some advanced features when compared to VMware Workstation Pro, it's still very capable, and meets the requirements of most individuals.

Okay, now that the introductions are over, lets proceed to sharing folders between our guest Ubuntu OS and the host machine.

Ingredients required:

  • An Ubuntu VM in VMware Workstation Player

SHARING FOLDERS

The first step would be to install the "vmware tools" on your Ubuntu Virtual Machine, if you haven't already. After that, power down the guest machine and go to its settings.

Then navigate to the "Shared Folders" section to begin adding the folder you wish to share with your Ubuntu virtual machine.

A wizard will pop up when you click the "Add..." button, use it to navigate and choose the host folder you are planning to share with the virtual machine. Leave rest of the things that you come across on the wizard as they are. When you are done with the wizard, the folder you chose would get listed in the "Folders" list. Then, you can click on the "OK" button and boot up the virtual machine.

The default location where your shared folder will show up is in /mnt/hgfs/. As an extra note, if you're wondering what hgfs means, it's an acronym for Host Guest File System.

Now, lets do an ls to see if the folder you shared is there.

ls /mnt/hgfs/
shared

Note: If for some reason the ls command doesn't show you anything, it could mean that the "vmware tools" are not installed.

Luckily we don't need to do anything more now. No special permissions or anything are needed to have access to the shared folder. Though completely optional, we'll proceed to making a symbolic link to the shared folder on our home directory, for ease of access.

ln -s /mnt/hgfs/shared ~/shared

And then, a quick peek inside the shared folder,

ls ~/shared
fish.sh igloo.jpg snow.jpg

And that is all!

Tags

Lime

Simple, like quantum physics.