VirtualBox is a powerful open-source virtualization software developed by Oracle Corporation. It allows users to run multiple operating systems (OS) on a single physical machine, simultaneously. This is done by creating virtual environments known as virtual machines (VMs).
Shared folders refer to a feature that allows file sharing between the host operating system (the main system running the virtualization software) and the guest operating system (the system running inside the virtual machine).
How to permanently mount the shared folder
Create a mount point (shared folder)
sudo mkdir /mnt/shared
Edit /etc/fstab
Open the /etc/fstab file in a text editor with root privileges.
sudo nano /etc/fstab
Add a Line for the Shared Folder
Add a new line at the end of the file with the following format (use a Tab key as the separator):
<shared_folder> /mnt/shared vboxsf defaults 0 0
Replace <shared_folder>
with the name of your VirtualBox shared folder, and /mnt/shared
with the path to your chosen mount point.
Example
shared /mnt/shared vboxsf defaults 0 0
Save the changes and close the text editor.
Use the following command to mount the shared folder immediately without restarting.
sudo mount -a
If the previous solution doesn’t work, try to use this.
Open the /etc/fstab file in a text editor with root privileges.
sudo nano /etc/fstab
Change the line for the Shared Folder to:
<shared_folder> /mnt/shared vboxsf defaults,_netdev,x-systemd.automount 0 0
Example
shared /mnt/shared vboxsf defaults,_netdev,x-systemd.automount 0 0