Skip to content

Instantly share code, notes, and snippets.

@elyezer
Created September 25, 2013 18:43
Show Gist options
  • Save elyezer/6704102 to your computer and use it in GitHub Desktop.
Save elyezer/6704102 to your computer and use it in GitHub Desktop.
Mount a VirtualBox shared folder on a guest linux system
#!/usr/bin/env bash
MOUNT_NAME="virtual-box-mount-name"
MOUNT_PATH="/path/to/mount/on/guest"
sudo mkdir -p $MOUNT_PATH
sudo mount -t vboxsf -o uid=`id -u $USER`,gid=`getent group $USER | cut -d: -f3`,rw $MOUNT_NAME $MOUNT_PATH
sudo chown `id -u $USER`:`getent group $USER | cut -d: -f3` $MOUNT_PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment