Assuming your Ubuntu guest username is USERNAME:
-
Make sure you have already installed the VirtualBox Guest Additions in the Ubuntu guest machine
-
From the Ubuntu guest:
sudo adduser USERNAME vboxsf
-
Using the VirtualBox UI (Devices->Shared Folder Settings…) add the folder in the hosting machine that you wish to share.
-
Restart the Ubuntu guest! (wasted too much time on that…)
ls /media/
– you’ll find your shared folder there. You might wish to mount it to a different directory on your Ubuntu guest