Enable File Sharing With Guest System in VirtualBox
For me the guest system is Arch Linux, so I mostly followed the relevant part in this link
On guest, install the VirtualBox Guest Additions:
pacman -S virtualbox-guest-utils
Manually load the modules with:
modprobe -a vboxguest vboxsf vboxvideo
Add the new modules to this file:
vi /etc/modules-load.d/virtualbox.conf
vboxguest vboxsf vboxvideo
Start the sharing services:
VBoxClient-all &
or do the following:
sudo systemctl enable vboxservice
sudo systemctl start vboxservice
Shared folders are managed via the VirtualBox program on the host. They may be added, auto-mounted and made read-only from there.
If automounting is enabled, and the vboxservice is enabled, creating a shared folder from the VirtualBox program on the host will mount that folder in /media/sf_SHAREDFOLDERNAME on the guest. To have that folder created on the Arch Guest, after the Guest Additions have been installed, you need to add your username to the vboxsf group.
groupadd vboxsf
gpasswd -a $USER vboxsf
Link the shared folder to your home directory if you want:
ln -s /media/sf_Shared/* ~/Shared
There are also suggestions to add entries in /etc/fstab, I didn't do that and it hasn't caused me any trouble.