For example:
I have a folder on my Windows installation named C:/shared_stuff
.
I have Ubuntu running inside VirtualBox on my Windows installation.
I want to access that folder inside Ubuntu under the path /mnt/shared_stuff
(this could be anything you like; it doesn't have to match the name of the folder in Windows).
- Inside settings for the VM, go to
Shared Folders
. - Add a Machine Folder (or check
Make Permanent
). - Give a
Folder Path
ofC:/shared_stuff
. - Give a
Folder Name
ofstuff
. - Hit 'Okay'.
sudo mkdir /mnt/shared_stuff
sudo mount -t vboxsf stuff /mnt/shared_stuff
There you go. Now you have a folder on your Windows installation that you can access within your Ubuntu virtual machine.
For my use case, I am installing a project to that shared folder (installing it using Ubuntu) and editing the contents of that project in Windows.
You might need to
chmod
the/mnt/shared_stuff
directory if you have mounting issues down the road.I had some issues upon rebooting Linux where it wasn't mounting properly. chmodding
shared_stuff
and then re-mountingsudo mount -t vboxsf projects /mnt/shared_stuff
did the trick.