How to Share Windows Host file system to Guest Ubuntu OS in VirtualBox

To share a windows file system, you will need to go to your VM’s settings, Select Shared Folders and click the Folder with Plus(+) icon on the right of the dialog box. Select the directory that you want to share and click OK.

You will also need to insert the VirtualBox’ Guest Addition CD image. You can do this by selecting the Devices in the Toolbar and you should see it in the bottom of the screen.

Once Guest Addition CD image is inserted, you will need to execute the following in the Guest OS’ Terminal

sudo apt-get install -y dkms build-essential linux-headers-generic linux-headers-$(uname -r)
sudo mount /dev/cdrom /media/cdrom
cd /media/cdrom

Reboot the Guest OS and create a folder anywhere

mkdir sharedWindows
sudo mount -t vboxsf -o uid=$UID,gid=$(id -g) Windows ~/sharedWindows

At this point, you should be able to see your C:\Windows contents in your Guest OS.

Leave a Reply

Your email address will not be published. Required fields are marked *