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 PathofC:/shared_stuff. - Give a
Folder Nameofstuff. - Hit 'Okay'.
sudo mkdir /mnt/shared_stuffsudo 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
chmodthe/mnt/shared_stuffdirectory if you have mounting issues down the road.I had some issues upon rebooting Linux where it wasn't mounting properly. chmodding
shared_stuffand then re-mountingsudo mount -t vboxsf projects /mnt/shared_stuffdid the trick.