Skip to content

Instantly share code, notes, and snippets.

@hoodoer
Created January 2, 2021 20:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hoodoer/8005b923bfd59d84808905c4414933c0 to your computer and use it in GitHub Desktop.
Save hoodoer/8005b923bfd59d84808905c4414933c0 to your computer and use it in GitHub Desktop.
Mount all VMWare shares in Linux guest
#!/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment