Copy files from windows to virtualbox linux

How to share the files from Windows Host to Guest in virtual box vm using Linux Guest Additions?

I have used Oracle VirtualBox to create a Linux VM and my Host machine is Windows.

This is the working template. It will not throw any issues if you follow this document clearly.

Step 1:

First step is to enable “Bidirectional” in “Drag and Drop” options and “Shared Clipboard” options.

Step 2:

Create a folder in your windows host machine. In my case the name of the folder is “windowsshare”. Once done, Click the virtual box manager and select your vm and go to settings.

Step 3:

Select “Shared Folder” and click the Plus icon on right to add the created folder in windows. Give the path of the folder and click “Auto-mount” and “Make-Permanent” options.

Step 4:

Start VM, go to Devices and click Insert Guest Additions CD image to mount the ISO image.

Step 5:

From the Linux terminal, run the following commands:

sudo -i

apt install gcc make

mkdir -p /media/cdrom

mount /dev/cdrom /media/cdrom



Step 6:

From the Linux terminal, run the following commands:
cd /media

mkdir windowsshare

cd /media

sudo mount -t vboxsf windowsshare/ /media/windowsshare

Step 7:

Once done. Place the files that you want to share in windowsshare folder in windows.In my case it is "success.txt".

Now if you do "ls" command in the in linux machine you can see that files are visible.