Knowledge Base

An archive of my personal knowledge base.

Mount VirtualBox shared folders on Linux

Cristian Sulea
Define a shared folder:
Temp
Create a folder where the shared folder will be mounted:
mkdir ~/Temp
Mount it:
mount -t vboxsf Temp ~/Temp

If you want to have it mount automatically upon each boot, put the mount command in /etc/rc.local (Debian based distro's), or whatever script is run at the end of the boot process. When you put the mount command in /etc/rc.local, so it's mounted at startup, you can't use the short notation for your home folder.

During startup, everything is done through the root user, so using ~ for home, means it's the home folder of Root (/root). Change it to the full path.

For example:
mount -t vboxsf Temp /home/<username>/Temp

Share on Twitter