Categories
Uncategorized

Virtual box: share folders between Windows host and Ubuntu guests

Virtual box ver: 5.22

Create a folder in windows, i.e c:\shared
Open virtualbox.
Select your guest OS, i.e Ubuntu
Click settings
click Shared Folders, and add c:\shared  (enable auto mount)
Click OK
Start your guest OS (Ubuntu)
Login to your guest OS
Click Devices, click “Insert Guest Additions CD image…”
If the installation fails, install linux-headers with the following command
[su_note] sudo apt-get install linux-headers-$(uname -r) [/su_note]
Try again, click Devices,  “Insert Guest Additions CD image…”

Now check what shares are available.
[su_note] sudo VBoxControl sharedfolder list [/su_note]
You should see:
[su_note] 1. shared [/su_note]

Mount it:
First create a folder on your linux host, i.e mkdir  winfolder
then mount it.
[su_note] sudo mount -t vboxsf shared  ~/winfolder [/su_note]