After installing VirtualBox Guest Additions into Ubuntu (or any other Linux), one of the feature that available for communication between guest virtual machine and host operating system is shared folders. Shared folders allow folders or directories on the host machine to be mapped and access from within guest OS as a network share. By using shared folders, users can easily transfer and move files between guest and host OS.

Connecting to and accessing the shared folders from host operating system is slightly different in Ubuntu specifically and Linux generally when comparing with accessing VirtualBox Shared Folders from Windows guest. Here’s a guide on how to connect and access shared folders on a Windows host operating system from a Ubuntu Linux guest operating system in VirtualBox. Although the guide uses Ubuntu as an example, the same principle applies to most Linux flavors.

  1. If not installed yet, install VirtualBox Guest Additions into the Ubuntu virtual machine.
  2. At the VirtualBox window’s menu, go to DevicesShared Folders. A “Shared Folders” dialog box will be shown.

    VirtualBox Shared Folders

  3. Click on the “Folder +” button to add a new shared folder.

    Map Shared Folders

  4. In the “Add Share” dialog box, enter the full path to the folder or directory on Windows host operating system that wants to be shared with guest operating system in Folder Path text box. Alternatively, click on the drop-down arrow and select Others to browse for folder.

    Interatively Share Folders

    Enter a descriptive name for the shared folder Folder Name. For user who browse for folder, a name is automatically entered based on selected folder, where user can alter the name if needed to. Do use a simple naming convention if it’s required to access the shared folder from guest OS in virtual machine.

    Click OK when done. The shared folder(s) specification should be listed under root tree of “Transient Folders”.

    Tip: Define as many shared folders as prefer by repeat the steps above. For users who want to grant only read-only access to the shared folders, tick the check box for Read-only. To make the shared folders permanent and available on every system restart, tick the check box for Make Permanent.

  5. Inside Ubuntu (or Linux) guest operating system, open a Terminal command-line session (from Applications -> Accessories).

    Open Terminal

  6. Create a directory in Linux as a mount point to reflect the shared folder in Windows host:

    sudo mkdir /media/windows-share

    The directory name can be changed according to user preference, so do the path location for the mountpoint.

  7. Mount the shared folder with the following command:

    sudo mount -t vboxsf <folder-name> /media/windows-share

    Change the <folder-name> to the “Folder Name” assigned to the shared folder when defining the Shared Folders in VirtualBox. Similarly, if you use different mount point, change the mountpoint accordingly.

  8. The Windows folder(s) are now mapped to the mount point, i.e. /media/windows-share, and can be accessed from the mount point for all file and folder manipulation operation.

Tip: To automate the mounting process to the shared folders, user can use the /etc/init.d/rc.local script to execute these commands so that the shared folders are mounted available automatically every time the Ubuntu (and any Linux) is starting up in VirtualBox.

Related Posts