How to share folder from Windows to Ubuntu in VirtualBox

On Windows, I sometimes run Ubuntu inside a VirtualBox virtual machine. I find that sharing a folder from Windows to Ubuntu is a convenient method of sharing files between the host and guest OS. Doing this is easy:

  • Install Guest Additions on the Ubuntu virtual machine.

  • Add your user to the group vboxsf in the Ubuntu VM:

$ sudo adduser yourusername vboxsf 
  • Power down the Ubuntu virtual machine.

  • In VirtualBox, right-click on the Ubuntu virtual machine and choose Settings → Shared Folders.

  • Choose Add Share. Choose the Folder Path to the directory you want to share. Note down the Folder Name displayed. This name will be used inside Ubuntu, so change it if you want. Check the Auto-mount option to have Ubuntu mount this directory whenever it starts up.

  • Power up the Ubuntu virtual machine. Your foo shared folder will be accessible in /media/sf_foo directory.

Tried with: Ubuntu 12.04 x64, Windows 7 Enterprise x64 and VirtualBox 4.2.0


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.