Shared Folder configuration in Vrtualbox virtual machine,
The Virtual Machine is installed with ubuntu 16.0.4 linux, and the local machine is macOs 10.12.1.
Configure Vrtualbox as follows:
In Vrtualbox --> Settings --> shared folder --> Add shared folder
Specify the path of the folder you want to share. This path refers to the path of the Local Machine. enter the name of the shared folder. You can use this name as needed. Here, share is used. Do not select auto mount here, do not select any option. If the virtual machine is installed with a windows system, select auto mount here.
Enter the virtual machine to start the ubuntu system, and create a folder path in the ubuntu system./etc/share
Open terminal Input
Sudo mount-t vboxsf share/etc/share
If prompted
Mount: unknown filesystem type 'vboxsf'
It indicates that you have not installed the enhanced plug-in of Vrtualbox. You can install this plug-in. Vrtualbox comes with this plug-in. If it enters the system, you will be prompted to install it.
You can now share folders. But you have to enter it again after restarting.
Sudo mount-t vboxsf share/etc/share
To enable automatic mounting after restart, add the following parameters to the/etc/fstab file:
Sudo vim/etc/fstab
Add
Share/etc/share vboxsf rw, gid = 110, uid = 1100, auto 0 0
After the restart, the shared folder still exists.