How to share a folder between your host and guest operating systems in VirtualBox

How to share a folder between your host and guest operating systems in VirtualBox

If you’re using VirtualBox to run multiple operating systems at once, you may want to share data between them. If you know how to mount folders in Linux or Unix, then this article will help you set up shared folders in VirtualBox. This can be helpful if you want to access the same data (such as your web server files) from more than one operating system. Let’s look at how to share folders in VirtualBox step by step.

Setting up Virtualbox

If you’re using VirtualBox for development or testing purposes, you’ll probably need to share folders between your host and guest operating systems. Here’s how to do it. First create the shared folder on the host machine: mkdir ~/shared-folder && chmod 777 ~/shared-folder Now, open up the settings of your virtual machine. On the second tab (after General), click on Shared Folders. In the dropdown box next to Folder Path, select Other Folder and type in /home/user/shared-folder as the path where this folder will be created on your virtual machine.

Download Ubuntu 16.04 ISO

  1. Download the Ubuntu 16.04 ISO from the Ubuntu website.
  2. Select the New button in VirtualBox to create a new virtual machine.
  3. Choose Linux for the Type and Ubuntu (64-bit) for the Version.
  4. Allocate at least 2GB of RAM for the VM and create a virtual hard disk of at least 8GB.
  5. Select the Storage settings and choose the Add Optical Drive option.

Creating a new virtual machine

Before you can create a new virtual machine, you’ll need to have VirtualBox installed on your computer. Once you have it installed, open the program and click New in the upper left corner. In the window that pops up, enter a name for your virtual machine and select the type of operating system you want to install. For this tutorial, we’re installing Windows 7. Click Next to move onto the next step. Here, choose how much memory (RAM) you want to allocate to your virtual machine (we recommend at least 2GB). We’ll be using 8GB. On the Boot Order page, choose IDE CD/DVD as your primary boot device and Hard Disk as secondary.

Start the virtual machine

If you’re using VirtualBox, you can easily share folders between your host and guest operating systems. This can be useful for transferring files between the two OSes, or for sharing data with other applications on your network. Here’s how to do it -In Windows 7, click Start > Control Panel > System and Security > System -In Mac OS X Leopard (10.5), click Finder > Applications > Utilities > Terminal -Type VirtualBox into the terminal window that pops up -Press enter. The following text should appear: Welcome to VirtualBox!

-Click Machine at the top of the window that popped up.

 Installing Guest Additions

VirtualBox Guest Additions are special software that can be installed inside guest operating systems to improve performance and add features. For example, they can enable the mouse pointer to seamlessly move between the host and guest operating systems, and shared folders can be used to easily transfer files between the two. To install them, you need to open up Settings -> System and click Shared Folders. Here you will see all of the shared folders currently set up on your system. You should see something like Default. If not, right-click on it and create a new one with the following settings:

Sharing files with the host OS

In order to share files between your host and guest operating systems, you’ll need to create a shared folder. Here’s how

  • Choose the directory where you want the shared folder created.
  •  Right-click on the directory and select Sharing.
  •  Click on Add Share to add a new sharing rule.
  •  Give it a name (e.g., VirtualBox) and click Ok. The dialog will close and open again with an editable comment box. If this is what you wanted, just hit Ok; otherwise type something into the editable box before hitting Ok.
  •  Repeat this process for any other directories you wish to share with the virtual machine.
  •  After adding all shares, check that they’re showing up correctly in VirtualBox by clicking Settings -> Shared Folders from the menu bar on top of your virtual machine window.

Leave a Reply

Your email address will not be published. Required fields are marked *