Step 1 – Enable Folder Sharing in VMware Workstation
Virtual Machine Settings/Options/Shared Folders
Step 2 – Check if the Created Share is Visible
A test is performed first if the shared folder is visible before relocating shared folders in VMware Workstation.
Step 3 – Create the Folder Where the Shared Host Folder Will Appear
Run the command mkdir <shared-folder-root-directory>, where “<shared-folder-root-directory>” may be created anywhere in the root (“/”) file system. It is preferable though, to create the directory in your home directory so it becomes easily accessible like your other user files like the Desktop, Documents, Downloads, Music, Pictures, Public, Templates, Videos, etc.
# mkdir <shared-folder-root-directory>
Step 4 – Mount the Shared Folder
Mount the shared folder. Replace “<shared_folder>” with the folder name used in Step 1 (in my example, it is “VMShare”). Replace “<shared-folder-root-directory>” with the directory name created in Step 3 (for me, it is /root/VMShare).
# vmhgfs-fuse -o allow_other -o auto_unmount .host:/<shared_folder> <shared-folder-root-directory>
The shared folder should now appear with a sharing icon in your home directory after a successful relocating of shared folders in VMware Workstation.
Step 5 – Add an Fstab Entry
The shared folder will disappear when you reboot your system and you will need to re-mount the shared folder. To make the mount permanent, edit the file /etc/fstab and append the line:
.host:/<shared_folder> <shared-folder-root-directory> fuse.vmhgfs-fuse nofail,allow_other 0 0
To edit the file, I usually use nano.
# nano /etc/fstab
After saving the file, that’s it. You’re shared folder will now show up in your home directory all the time in between reboots.
Note: In other Linux distributions where VMware Tools are installed as it is, without any patches, once the shared folder is created in the VM Settings/Options, the shared folder automatically appears (get mounted) at /mnt/hgfs/<shared-name> directory.