Mounting VMWare Shared Folders on Linux (Kali)

Create a new file with the following contents:

#!/bin/bash

vmware-hgfsclient | while read folder; do
  echo "[i] Mounting ${folder}   (/mnt/hgfs/${folder})"
  mkdir -p "/mnt/hgfs/${folder}"
  umount -f "/mnt/hgfs/${folder}" 2>/dev/null
  vmhgfs-fuse -o allow_other -o auto_unmount ".host:/${folder}" "/mnt/hgfs/${folder}"
done

sleep 2s

Save as mount-shared-folders.sh

Make the file executable

chmod +x mount-shared-folders.sh

Run the script as root

sudo ./mount-shared-folders.sh

Your shared folders from the host computer should not be accessible at /mnt/hgfs

Leave a Reply

Your email address will not be published. Required fields are marked *