Skip to content

Instantly share code, notes, and snippets.

@scottj
Forked from mgeeky/mount-shared-folders.sh
Last active April 17, 2024 22:23
Show Gist options
  • Save scottj/67a567fce5c3e595a9ccf4adee4f0f79 to your computer and use it in GitHub Desktop.
Save scottj/67a567fce5c3e595a9ccf4adee4f0f79 to your computer and use it in GitHub Desktop.
VMware mount shared folders (taken from Kali)
#!/bin/bash
sudo -v || exit
vmware-hgfsclient | while read folder; do
echo "[i] Mounting ${folder} (/mnt/hgfs/${folder})"
sudo mkdir -p "/mnt/hgfs/${folder}"
sudo umount -f "/mnt/hgfs/${folder}" 2>/dev/null
sudo vmhgfs-fuse -o allow_other -o auto_unmount ".host:/${folder}" "/mnt/hgfs/${folder}"
done
sleep 2s
@scottj
Copy link
Author

scottj commented Apr 17, 2024

Updated to execute with sudo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment