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.
Edge case: If you're using npm and are getting a symlink error, add
--no-bin-links
to yournpm install
commands. The error is because it's actually a Windows folder as I understand it.