I assume you were able to create an Ubuntu virtual machine with VirtualBox.

VirtualBox. Shared folder

Set up VirtualBox shared folders

Let’s try now to share a folder between the host machine and the VirtualBox virtual machine.

First we need to create a folder on the host machine and set that folder as a shared folder in Settings -> Shared Folder of VirtualBox Manager

Create VirtualBox shared folder

Set up VirtualBox shared folder

Create a folder in the home directory of the VirtualBox virtual machine with that name.

Guest Additions

In the virtual machine go to the top menu: Devices -> Insert Guest Additions CD image...

Click “Run” on the popup and confirm with the root password

Mount Ubuntu VirtualBox shared folder

Once the installation finished run the command in the terminal to mount the shared folder in the VirtualBox Ubuntu virtual machine

sudo mount -t vboxsf blog blog

Now if you go to the folder you’ll see that folders blog on the host and the virtual machine have same content.

That means you successfully setup the VirtualBox shared folder for a Ubuntu virtual machine and you can access that shared folder from a Virtual Ubuntu virtual machine

Done!