Access Windows folder from Linux Virtual Machine

Access Windows folder from Linux Virtual Machine

In today’s article we will show a step by step guide on how to access the Host Drive (Windows) from Guest drive in the Virtual Machine(Linux).

In this demonstration we will use the following softwares-

  • Oracle VM VirtualBox hosting Linux OS – Guest Machine
  • Windows 7 – Host Machine

Step 1:
Create a folder in the Windows Drive which needs to be shared with the Virtual Machine. E.g. D:\SharedDrive

Step 2:
In the virtual machine we will need to map the network drive of the host machine. In the menu option go to Devices->Shared Folders Settings…

Linux Shared Folder Settings
Linux Shared Folder Settings

Step 3:
Under the Shared Folders option click Add Share button. Browse through the folder locaton SharedDrive in the Windows D Drive.
Give a name to the Folder name which can be referred during the mapping.  Check the box for Auto mount and Make permanent. Click OK and proceed.

 

Map Share Drive
Map Share Drive

Step 4:
Go to the Unix terminal. Create a folder using the command mkdir. In this example we are planning to create a folder inside home directory.

[oracle@localhost ~]$ cd /home
[oracle@localhost home]$ sudo mkdir windowsdrive

 

Create directory command
Create directory command

Step 5:
Then map the windows folder “SharedDrive” to the newly created folder in Unix “windowsdrive”.
Now if you create a file in the SharedDrive folder in Windows it gets reflected in the Unix /home/windowsdrive folder.

sudo mount -t vboxsf SharedDrive /home/windowsdrive

The above command will mount the “SharedDrive” (mapped folder) as a directory /home/windowsdrive (local folder created in the guest machine.

Map Shared Drive to Local Drive
Map Shared Drive to Local Drive

Hope this guide is helpful. Please feel free to give comments and feedback.

Share This Post

One Response to "Access Windows folder from Linux Virtual Machine"

Post Comment