Skip to content

Instantly share code, notes, and snippets.

@wiledal
Created September 24, 2013 08:21
Show Gist options
  • Save wiledal/6681846 to your computer and use it in GitHub Desktop.
Save wiledal/6681846 to your computer and use it in GitHub Desktop.
Set up auto mount for folders shared in VirtualBox with one command line. Replace <SHARED FOLDER> with the folder which is shared.
sudo touch /etc/init.d/mountdisks.sh; sudo sh -c 'echo "mount -t vboxsf <SHARED FOLDER> /var/www" > /etc/init.d/mountdisks.sh'; sudo chmod +x /etc/init.d/mountdisks.sh; sudo ln -s /etc/init.d/mountdisks.sh /etc/rc5.d/S20mountdisks.sh; sudo ln -s /etc/init.d/mountdisks.sh /etc/rc2.d/S20mountdisks.sh;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment