Table of Contents
In this article, I will take you through the steps to share folder between Windows 10 Host OS and Ubuntu 20.04 Guest OS. If you are running a Guest OS on your Host OS system, then sometimes you might face a situation where you need to transfer some files between Host OS and Guest OS. When you have Windows OS as both Guest and Host OS then somewhere you might find it easy to share between the two systems but what if both the systems has different OS. Then it becomes a challenge.
Well, there is nothing to worry about. I am going to show you how easily you can setup a shared folder between Windows 10 Host OS and Ubuntu 20.04 Guest OS using some simple steps. So that file sharing can be done with ease. Let's begin !!
How to Share Folder Between Windows 10 Host OS and Ubuntu 20.04 Guest OS
Also Read: How to Display Nth Column of a File or an Output using Windows Command Line
Step 1: Prerequisites
a) You should have a running Windows 10
Host System.
b) You should have a running Ubuntu 20.04
Guest System.
c) You should have administrator access on Windows 10
System.
d) You should have root or sudo access on Ubuntu 20.04 System.
Step 2: Create Folder in Host OS
You need to first create a folder in Host OS which you want to share with Guest OS. Here I am creating a folder called ubuntu
under C:\Users\cyberithub\Downloads
location which I will share with the Ubuntu OS in the subsequent steps.
Step 3: Install Guest Image CD Additions
On Ubuntu VM, Go to Devices
->Insert Guest Additions CD Image
and Click on it. Once Clicked, you will get a pop-up to run the VirtualBox Guest Additions Installation. Once you click on Run
, it will start installing like below. After successful installation, it will ask you to Press Return to close this window. Press Enter
to close this session.
NOTE:
Step 4: Create Shared Folders
Now go to Shared Folders and Click on (+)
to add a new Share. Here you need to browse the path of the folder which you created in the Windows 10 Host OS. Then you need to provide the Folder Name and Mount Point. Next I am sharing my folder location as C:\Users\cyberithub\Downloads\ubuntu
which I created in the earlier step. Then providing the folder name as ubuntu
and finally giving the mount point as /u01
. I will also make sure to click on Auto-mount
so that every time System restarts, it will mount automatically. Then Click on OK
. More about VirtualBox Shared Folders.
Step 5: Share File
In the next step, I am going to directory /u01
using cd /u01
command and then copying a file hello.txt
from cyberithub home folder to the current folder using cp /home/cyberithub/hello.txt .
command. This is done to check if the file is indeed getting shared and available in my Windows 10 System.
root@localhost:~# cd /u01/ root@localhost:/u01# cp /home/cyberithub/hello.txt . root@localhost:/u01#
Then I will go to Windows 10 System and check my ubuntu folder if the hello.txt file is available there. As you can see below, it is indeed available. So this confirms my successful setup of a Shared Folder between Host OS and Guest OS.