BytesOfProgress

Wiki


Adding a shared folder in VirtualBox VM

This method is tested in Debian 11, but will probably work in everything Debian-based.

You should have already created a folder on your host system, and set it as the shared folder inside the VirtualBox GUI. Now, how do we access the directory from our guest system?

The official way of doing this is rather complicated and requires mounting a virtual CD-ROM to the guest system, which can be tricky.

On debian.org, they showcase another way of doing it, which is much simpler in my opinion.

On the guest system, run:


  # apt install lsb-release -y
    


  echo "deb http://deb.debian.org/debian $(lsb_release -cs)-backports main contrib" | tee /etc/apt/sources.list.d/backports.list
    


  # apt install fasttrack-archive-keyring -y
    


  # apt update
    

With a Desktop Environment which uses X11:


  # apt install virtualbox-guest-x11 -y
    

If you don't need X11 (e.g. you have a headless installation), you can install only the CLI utils with:


  # apt install virtualbox-guest-utils -y
    




back