Skip to content

Instantly share code, notes, and snippets.

@subfission
Last active December 16, 2019 08:26
Show Gist options
  • Select an option

  • Save subfission/ccbceef7852cbf8b9378f37278284e6a to your computer and use it in GitHub Desktop.

Select an option

Save subfission/ccbceef7852cbf8b9378f37278284e6a to your computer and use it in GitHub Desktop.
Mounting Scripts in Linux Guest
#!/bin/bash
#
# Example for VMWare setup of guest mounts
#
# This example checks for folder called Scripts on host to be shared.
# This can be used with curl |bash for simplicity
echo "Attempting install of vmware-tools [errors ignored]"
sudo apt-get install -y open-vm-tools 2>/dev/null
echo "Mounting to $MPATH"
sudo /usr/bin/vmhgfs-fuse .host:/ /mnt/hgfs -o subtype=vmhgfs-fuse,allow_other
echo "Manually add this to /etc/fstab"
echo ".host:/ /mnt/hgfs fuse.vmhgfs-fuse defaults,allow_other 0 0"
if [ -d /mnt/hgfs/Scripts ]; then
if [ ! -h /opt/Scripts]; then
sudo ln -s /mnt/hgfs/Scripts/ /opt/Scripts 2>/dev/null
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment