Home » Operating Systems » Setup VirtualBox shared folders on Windows or Linux hosts
Operating Systems

Setup VirtualBox shared folders on Windows or Linux hosts

VirtualBox shared folders allow you to share files between the guest and the host OSes on VirtualBox virtualization software. We have already showed you how to install VirtualBox on Windows and Ubuntu/Debian, and guest additions on Ubuntu/Debian and Windows. While VirtualBox Guest Additions increase the compatibility between guest and host OSes, I find that in some situations it is much more beneficial to have a VBox shared folder. For example, when I am writing a bash script on Windows, I can quickly run the script in my Ubuntu VM to check.

In this post, I will first show you how to setup a VirtualBox shared folder on host OS. VirtualBox interface is the same on both Windows and Linux. While I use VirtualBox on Windows 8 and Windows 10 for demonstration in this post, the procedure is exactly the same for Linux distributions, including Ubuntu.

Setup VirtualBox Shared Folders on Host OS

The first step in sharing a folder between guest and host OS is to create shared folder in VirtualBox. This is done while setting up the virtual machine on host OS (could be any OS) or at any point after setting up the virtual machine. The procedure to add Shared Folders in VirtualBox is the same for any host OS. If you are setting up a new virtual machine with shared folder then click on Shared Folder. On an existing and running VM click go to DevicesShared Folder Settings.

VirtualBox Shared Folders Settings on Running VM
Shared Folder Settings on Running VM

If you are adding a shared folder to an existing but powered-down VM then, right-click on the machine, and go to Settings->Shared Folder.

Add Shared Folder in Oracle Virtual Box
Add Shared Folder in VirtualBox

Next click on the + on the right to add VirtualBox shared folders as shown in the picture above. Browse and choose a folder to share for Folder Path. Then, provide a ShareName or Folder Name (keep this short and simple). In this tutorial I am choosing “Share”. Finally check Auto-mount (see picture below). Auto-mount will automatically mount the shared folder upon boot (or immediately on a running VM).

Create Shared Folder VirtualBox
Create VirtualBox Shared Folder

Auto-mount vs Make Permanent: If you open Shared Folder Settings on a running VM, you may also see Make Permanent option that will be checked by default (as shown in the picture below).

Make Permanent Option on Running VBox VM
Make Permanent Option on Running VBox VM

When adding a shared folder on a running VM, Auto-mount will mount the folder immediately but the mount will not stick after reboot. Make Permanent makes automount VirtualBox shared folder persistent (sticks on reboot).

So as you can see you can setup VirtualBox Shared folders at any point: during VM creation or while VM is running. Now you know how to share folder on VirtualBox. But how to share files with VirtualBox? In order to share files you will have to mount VirtualBox shared folders in the guest OS. So in the upcoming posts, we will show you how to mount and access VirtualBox shared folders in Linux and Windows guests.

Complete Guide to Setting Up a Home Server on VirtualBox Virtual Machine

  1. Install VirtualBox - Windows 7/8/10 / Ubuntu/Debian
  2. Install VirtualBox Extension Pack - Linux and Windows Host
  3. Install Guest OS on Virtual Box - Ubuntu Server
  4. Install VirtualBox Guest Additions - Windows Guest / Linux Guest
  5. Update VirtualBox Guest Additions - Windows Guest / Linux Guest
  6. Setup VirtualBox Shared Folder - Windows and Linux
  7. Mount VirtualBox Shared Folder - Windows Guest / Ubuntu Guest
  8. Access USB Drive on VM - Windows and Linux Guest
  9. Configure Home Server on VirtualBox - Ubuntu Server

About the author


Anand is a self-learned computer enthusiast, a part-time blogger, and a Food Scientist by career. He has been blogging since 2010 on Linux, Ubuntu, Home/Media/File Servers, XBMC, and related HOW-TOs (read more).


Join the other 110,000 followers