1. After installing Ubuntu in virtual boxz, choose to install and add features.
2. There will be an additional optical drive device on the desktop, and the following window will pop up. Click OK to start automatic installation.
3. After the enhancement function is installed, allocate the data space to the folder to be shared with Ubuntu on the Windows host.
Data Space name, which is defined as spatial space. Select whether to enable read-only, automatic mounting, and fixed allocation as needed.
5. Return to Ubuntu for mounting.
Enter the terminal and enter the following command:
(1)Sudo mkdir folder for storing shared data
For example: sudo mkdir/home/share # create a Folder Share to store shared data
(2)Sudo Mount-T vboxsf data space name shared folder path
For example, sudo Mount-T vboxsf container space/home/share # map the container space with the created folder.
Note that the name of the data space cannot be the same as that of the shared folder. Otherwise, the system prompts mounting failed with the error: protocol error.
(3) If you want to uninstall the ing, enter:
Sudo umount-F shared folder path
6. automatic mounting
The above method creates a shared folder between the Ubuntu Virtual Machine and windows. You need to re-mount the folder every time you start ubuntu. You can use the following method to automatically mount the folder.
(1) enter the terminal and enter:
Sudo gedit/etc/rc. Local# RC. Local is the User-Defined boot program. at the final stage of Linux Startup, the system will execute commands stored in RC. Local.
(2) Add the following line before the return 0 of the document:
Mount-T vboxsf memory space/home/share, Save, and restart. After the system starts, it will automatically mount the ing operation.