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 virtualization of OS, 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 VirtualBoxThis functionality is essential for efficiently exchanging files and facilitating collaborative work between both environments, allowing both the real and virtual systems to have secure and rapid access to documents, images, programs, and any type of content.

In this article, we explain to you in a way exhaustive, detailed and up-to-date all options, considerations, methods and Tricks available to get one Seamless integration of shared folders between host and guest in VirtualBox. Whether you use Windows, Linux or even macOS, here you will find everything necessary for this exchange to work perfectlyIn addition, we'll share alternatives and security tips so you can choose the system that best suits your needs. This compendium gathers, restructures, and expands the most relevant information from the most well-positioned sources on the web, adapting it to natural and fresh 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 possibility of allowing file sharing between the main operating system (host) and the Virtual machines (guest) that we run through this popular virtualization software. Thanks to this feature, we can access certain directories on 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 utility of shared folders Their advantage lies in the fact that they eliminate the need for impractical workarounds, 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 distro (Ubuntu, Debian, Fedora, etc.), and even Solaris or FreeBSD. Managing shared folders is very similar in all cases, although there are specific features depending on the guest system that should be known to avoid permissions or compatibility issues.

Essential requirements before starting

Before setting up any shared folder, it is important to take into account a series of previous requirements 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.
  What is the best way to get rid of someone you've met on Tinder? This is the easiest method

How to install Guest Additions on Windows and Linux

The first step to make everything work properly is Install Guest Additions in 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.

Eye: On some distros, you may need to pre-install kernel headers and compilers (e.g., 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.
  F1 to F12 keys: Functions and how to make the most of them

Once you have everything ready, press Accept 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 menu Tools → Map Network Drive, choosing a letter and the route \\VBOXSRV\FolderName.

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

On Linux operating systems, VirtualBox uses the virtual file system vbox.sf to mount the 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 article:
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.
  Tips for creating routines with the clock in Windows 11

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 path between the main system and the virtual system. Therefore, it is important to consider some aspects of safety and good 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 vboxsfThis is useful when automount doesn't work or has been disabled.

To facilitate frequent access, you can create symbolic links on your system, such as on the Desktop, with commands type ln -s /media/sf_FolderName ~/Desktop/FolderNameThis allows you to quickly access and improve your productivity.

In addition to shared folders, VirtualBox offers other ways to transfer files such as USB, drag and drop, shared clipboard and cloud services. These options complement the core functionality and facilitate work 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 article:
How to Change the Default Folder Location in Windows 11: Complete and Updated Guide