How to share folders between the virtualized system and the host in VirtualBox

Last update: 21/05/2025
Author Isaac
  • Installing Guest Additions is key to enabling shared folders in VirtualBox.
  • Setting permissions and folder type (permanent or temporary) gives you flexibility and security.
  • Alternatives such as USB, clipboard or cloud services complement the traditional shared folder system.

virtualbox share folder

With the growth of operating system virtualization , one of the most common challenges faced by both home and professional users is the need to share folders between the host computer and the virtualized system in VirtualBox . This functionality is essential for efficiently exchanging files and facilitating collaboration between both environments, allowing both the physical and virtual systems to have secure and fast access to documents, images, programs, and any other type of content.

In this article, we explain comprehensively , in detail, and with up-to-date information, all the options, considerations, methods, and tricks available for achieving seamless integration of shared folders between host and guest in VirtualBox . Whether you use Windows , Linux , or even macOS, you'll find everything you need here to make this sharing work perfectly . We'll also share alternatives and security tips so you can choose the system that best suits your needs. This guide gathers, restructures, and expands upon the most relevant information from top-ranked online sources, adapting it to a clear and accessible language so any user can understand and implement it without complications.

What are shared folders in VirtualBox and why are they so useful?

The concept of shared folders in VirtualBox refers to the ability to allow file sharing between the main operating system (host) and the virtual machines (guest) running through this popular virtualization software. Thanks to this functionality, we can access specific directories of the physical system from the virtualized system, and vice versa, as if they were on a local network, but with added advantages in terms of speed and ease of configuration.

The great advantage of shared folders lies in the fact that they eliminate the need for impractical solutions, such as using USB drives, email, or cloud services to transfer data. This is especially relevant for developers, system administrators, testers, and any user who needs to move documentation, disk images, projects, or resources between the two environments quickly and easily.

Furthermore, VirtualBox supports a wide variety of host and guest operating systems : from Windows and macOS to any Linux distribution (Ubuntu, Debian, Fedora, etc.), and even Solaris or FreeBSD. Shared folder management is very similar in all cases, although there are specific features depending on the guest system that should be understood to avoid permission or compatibility issues.

Essential requirements before starting

Before setting up any shared folder, it's important to consider a number of prerequisites to avoid errors and ensure everything works the first time:

  • Installing Guest AdditionsIt's essential to install the Guest Additions package on the guest system. Without this add-on, shared folders (and other features like two-way copy/paste and improved graphical integration) won't be available.
  • Appropriate permissions on the host system: The user running VirtualBox must have access and modification rights to the folder to be shared.
  • Supported versions of VirtualBox and Guest Additions: It is recommended to keep both the core software and add-ons up to date, as very old versions can cause problems, especially on modern systems or after certain Windows or Linux updates.
  How can I use the keyboard to show a hidden cell in Excel? - Best shortcuts

How to install Guest Additions on Windows and Linux

The first step to ensure everything works correctly is to install the Guest Additions on the virtual machine. This process is fairly straightforward, but varies slightly depending on the guest operating system:

Installation on virtualized Windows systems

1. Start the virtual machine with Windows.
2. From the VirtualBox menu, select Devices → Insert Guest Additions CD Image.
3. Within Windows, a wizard will open automatically. If it doesn't appear, open File Explorer and navigate to the CD drive to run it. VBoxWindowsAdditions.exe.
4. Follow the steps in the installer and restart the virtual machine when finished.

Installation on virtualized Linux systems (Debian, Ubuntu, Xubuntu…)

1. Start the virtual machine with your Linux system.
2. Select Devices → Insert Guest Additions CD Image in the VirtualBox menu.
3. Access from a terminal to the mounted unit (normally /media/cdrom or similar).
4. Run the appropriate installer for your architecture: sudo sh VBoxLinuxAdditions.run.
5. Wait for the installation to finish and restart the virtual machine.

Note: In some distributions you may need to install the kernel headers and compilers beforehand (for example, with `sudo apt install build-essential dkms linux-headers-$(uname -r)` on Debian/Ubuntu), since Guest Additions compiles some modules for the system.

Configuring the shared folder in VirtualBox from the host

virtualbox shared folder

Once you have Guest Additions installed on your guest system, the next step is to create a folder on your main system (be it Windows, Linux, or macOS) that will serve as the shared space for the virtual machine. This process is very similar on all host systems:

  1. Create a folder anywhere on your host. For example, C:\VirtualBoxShare on Windows or /home/user/shared on Linux.
  2. With the virtual machine off (or paused), select it in the VirtualBox manager and click on Configuration (the gear icon).
  3. In the side menu, choose Shared folders.
  4. Click the folder icon with the sign + to add a new shared folder.

In the window that opens, configure the following parameters:

  • Folder path: Specify the full path to the folder to be shared on your primary computer.
  • Folder name: Enter the name that will be displayed on the virtualized system.
  • Read only: Check this box if you DO NOT want the guest system to be able to modify files (recommended if you need maximum security, for example, when the virtual machine is used by other users).
  • Self-assembly: If you select it, the folder will be mounted automatically every time you Boot the virtual machine, which greatly simplifies the process.
  • Make permanent: Enable this option if you want the folder to remain shared after shutting down or restarting the virtual machine.
  • Mounting point: (optional, only on some systems) If you are using Linux as a guest, you can define the exact directory where the shared folder will be mounted.
  How you can Add App or Program to Startup in Home windows 10

Once you have everything ready, press OK and the folder will be configured.

Methods of accessing shared folders from different guest systems

Accessing shared folders on virtualized Windows systems

When you have a Windows virtual machine (for example, Windows 10, 8 or 7), the way to access the shared folder is very similar to doing so on a local network:

  1. Open the File Browser.
  2. In the side panel, select RedIf nothing appears, wait a few seconds or click on Update.
  3. A device called should be displayed VBOXSRV. Double-click on it.
  4. You will see one or more shared folders, with the names assigned above.
  5. Double-click the folder to access its contents. If you have write permissions, you can copy, create, or delete files from the virtual machine as if they were in a Windows-based folder.

If you want to map the folder as a fixed network drive, you can do so from the Tools menu → Map network drive , choosing a letter and the path \\VBOXSRV\FolderName.

Accessing shared folders from GNU/Linux (Ubuntu, Debian, etc.) as a guest system

On Linux operating systems, VirtualBox uses the vboxsf virtual file system to mount shared folders.

The process consists of:

  1. Make sure that the user you are working with inside the virtual machine belongs to the group vbox.sfThis is required to have permissions to the folder. To add yourself, run:
    sudo usermod -a -G vboxsf «$(whoami)»
  2. Reboot the virtual machine for the group changes to take effect.
  3. Normally, VirtualBox will mount shared folders on /media/sf_FolderName. For example, if the folder name is "VB", it will be mounted on /media/sf_VB.
  4. If you've set up a custom mount point, access that path from your file explorer or terminal.

If the folder is not automatically mounted (for example, if you have unchecked “Automount”), you can mount it manually with the following command, replacing “FolderName” and “MountPoint” with the appropriate values:

sudo mount -t vboxsf FolderName MountPoint

For example:

sudo mount -t vboxsf VB /mnt

You will now be able to browse, copy, and modify files according to the configured permissions.

shared network resources
Related articles:
Shared resources in Windows: what they are and how to use them correctly on a network

Types of shared folders: permanent and temporary

One of the most interesting features of VirtualBox is the ability to define permanent or temporary shared folders :

  • Permanent: These are created and maintained even if the virtual machine is shut down or restarted. They're ideal if you need a constant exchange of information between the host and guest.
  • Transitory: These are set only for the current session and disappear when the virtual machine is shut down. They are useful for one-off or temporary tasks.
  Easy methods to Discover Parked Automotive Using Apple Maps on iPhone

Both types are configured in the same section of VirtualBox, with the difference being whether or not the “Make permanent” box is checked.

Advanced options and security recommendations when sharing folders

Sharing folders involves opening a direct communication channel between the host system and the virtual environment. Therefore, it's important to consider some security aspects and best practices :

  • Limit access to only necessary folders. Avoid sharing personal or system directories (such as the entire “C:\Users”) unless absolutely necessary.
  • Use the “Read Only” option if you don’t need to write from the guest. This way you protect files from accidental modification or potential threats.
  • Be careful with permissions on Linux: Within the guest, only users belonging to the “vboxsf” group can access the folder. Remember that you can add more users to that group if necessary.
  • Update Guest Additions and VirtualBox periodically to avoid vulnerabilities.

Before manually installing or troubleshooting, it's a good idea to check that Guest Additions and VirtualBox are running their latest version, as many issues arise from incompatibilities or outdated versions.

On Linux systems, manually mounting a shared folder can be done by creating a mount point and using the command `mount -t vboxsf` . This is useful when auto-mounting is not working or has been disabled.

To facilitate frequent access, you can create symbolic links on your system, such as on the Desktop, using commands like `ln -s /media/sf_FolderName ~/Desktop/FolderName` . This allows for quick access and improves your productivity.

In addition to shared folders, VirtualBox offers other file transfer methods such as USB, drag and drop, shared clipboard , and cloud services. These options complement the core functionality and facilitate working in virtualized environments.

For specific cases, configurations can be tailored to the use case, the required security level, and operating system compatibility. Keeping Guest Additions up to date, sharing only what's essential, and using quick links are good practices that improve efficiency and security when managing shared files.

How to change the default folder location in Windows 11-2
Related articles:
How to Change the Default Folder Location in Windows 11: Complete and Updated Guide