Virtualbox: shared folders between host (Ubuntu) and guest (Ubuntu)

Submitted by Jochus on Thu, 30/12/2010 - 15:11 | Posted in: Linux


If you want to create a shared folder between your host and guest machine (using VirtualBox), you should execute following steps:

  • Make sure you have the virtualbox-guest-additions installed on your system. If not, install it:
    $ sudo aptitude install virtualbox-guest-additions
  • Now install those guest additions in the guest domain: Devices > Install guest additions ... [Host + D]
  • On the host (Ubuntu) computer, run
    $ mkdir ~/VirtualBoxShare
    $ VBoxManage sharedfolder add "Ubuntu 10.10" -name "myshare" -hostpath /home/your/shared/folder/VirtualBoxShare/

    Where "Ubuntu 10.10" is the name of the virtual machine in VirtualBox, and "myshare" is the name of the share as the guest machine will see it. The hostpath must be a fully-qualified path.

  • If the client is Linux, you have to mount and connect it to a folder. Run :
    $ mkdir /mnt/mountpoint
    $ cd /mnt/mountpoint
    $ sudo mount -t vboxsf myshare mountpoint

Add new comment

The content of this field is kept private and will not be shown publicly.

Full HTML

  • Lines and paragraphs break automatically.
  • You can caption images (data-caption="Text"), but also videos, blockquotes, and so on.
  • Web page addresses and email addresses turn into links automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <bash>, <cpp>, <css>, <html5>, <java>, <javascript>, <php>, <sql>, <xml>. The supported tag styles are: <foo>, [foo].
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.