Search code examples
linuxubuntuvirtualboxshared-directory

How to access a shared folder with Ubuntu on VirtualBox


I have a Virtual Machine, and I want to share some files with my computer. But I don't know how to access them.

In the settings of my VM, I added the repository that I want to share. After that I started my VM and I think that I have to use the "mount" command. I also think that the repository that I want is in /dev but I don't know which file after that.

This is the command that I think I have to use :

mount -t vfat /dev/something /media/sf-Documents

Can someone help me and tell me how I have to do to get the content of my folder on my computer please ?


Solution

  • Usually, it is sufficient to:

    • Install the Guest Additions
    • Enter the Settings -> Shared folders menu
    • Click on the "+" icon
    • Select "automatic mount"
    • Reboot the machine
    • You'll find the shared folder under the /media directory

    This procedure is known to not work for some versions of the Guest Additions. In case, try a different version of VirtualBox (e.g., switch from 5 to the more stable 4 version).