Share folder in Virtual Box (ubuntu/debian)
Inside the guest system install:
sudo apt update
sudo apt install -y build-essential
sudo apt install -y dkms
sudo apt install -y linux-headers-$(uname -r)
Select a folder on the host system through the menu!
Devices→shared folders→shared folders settings
Select automount and permanent hold
RESTART THE GUEST SYSTEM
Mount the CD disk by clicking in the menu devices→insert guest additions CD image
Go through the folder manager to this disk,
run IN THIS DISK terminal,
enter
sudo sh VBoxLinuxAdditions.run
INSTALLATION TAKES ABOUT 2 MINUTES
REBOOT THE GUEST SYSTEM
after reboot, select:
Devices->Shared Clipboard->biderectional
Devices->Drug and Drop->biderectional
in the terminal enter:
sudo usermod -a -G vboxsf UserName
sudo chown -R UserName:users /media/sf_FolderName/
be sure to put a / slash at the end (t .k. add the contents of the folder)
UserName – your username in the virtual box
FolderName – your shared folder name
REBOOT THE GUEST SYSTEM
that’s all
