VirtualBox Ubuntu shared folder is empty

Solution 1:

Found my answer

Assumption: "VirtualShare" is the shared folder name set up via Devices | shared folders ... menu

sudo mkdir /mnt/MyShare
sudo mount -t vboxsf VirtualShare /mnt/MyShare

AH! Now I can see the files in /mnt/MyShare/VirtualShare/

  • the mounting :( does not survive a restart/reboot

This answer is bewildering because the VirtualBox documentation explicitly states that auto mounting is done in /media directory. And indeed, the shared folder is created - but its empty.

Further, I did/do not understand the significance of /mnt directory. That looked arbitrary to me, but apparently not. ../MyShare piece of it is; use any name you wish.

Now if I could only delete all those folders I created during experimentation. And to think I used to be an absolute wiz on the CP/M command line! (that sure dates me!!)

Solution 2:

Suppose Virtual_Share is the name given to the shared folder as shown below.

enter image description here

Create a directory in a desired place, e.g., /media/VirtualShare

Open this file

$ sudo gedit /etc/profile

Add the following line in the file then save and close.

mount -t vboxsf Virtual_Share /media/VirtualShare

Source the /etc/profile file in Terminal...

$ sudo source /etc/profile

... or just reboot.

This solved it for me.