Sometimes you need to share data files between your host computer and your Ubuntu virtualbox. In this tutorial, you will learn how to achieve this so that you will be able to access folders orfiles on your host computer from your Ubuntu virtualbox.
Before starting the sharting process, it is mandatory to install your so called virtualbox guest additions. This will allow you to use some cool features such copy and paste, folder sharing and mouse integration.
Now that you have installed the guest additions, select your Ubuntu virtual machine as shown below :
And then click on Settings on the menu bar. The popup below will show up. Select the Shared Folders item.
On the right hand side, click on the icon with the Add sign. The dialog box below will be displayed.
Once you click on the Folder Path drop-down list, select the ‘Other’ item.
You will be able to select a folder to be shared with your virtualbox. See snapshot below.
Once the folder is chosen, its full path will be inserted. Tick the checkbox Auto-mount. Click on OK to finish.
The selected folder will be displayed in the Transient Folders List as shown below. Click OK to close the window.
Now run your Ubuntu virtualbox and open up a terminal session.
Run the command below as root :
sudo apt install virtualbox-guest-utils
Once completed, exit the terminal.
Now open your file explorer :
Virtualbox shared folders
You will see your shared folder but with the string “sf_” added at the beginning.
If you click on the shared folder you will most likely see the error message below :
Virtualbox shared folder Ubuntu
In order to access the shared folders, you would need to add your user to a group called vboxsf (there are users and groups). Open up your terminal and run the command below :
sudo adduser [username] vboxsf
Now enter the command :
And access again your shared folder. You will be able to create/delete/change files .
Virtualbox shared folders Linux
If you like the content, we would appreciate your support by buying us a coffee. Thank you so much for your visit and support.