I recently installed vbox and installed the ubuntu system to realize file sharing between the virtual machine and the host. I found some information, successfully solved the shared file, and recorded the operation process.
1. vbox settings
2. Load the enhanced function image
3. Mounting
Start the virtual machine and execute the following command:
mount /dev/cdrom /mnt/cdrom
4. Running the Enhancement Script
The command is as follows:
./VBoxLinuxAdditions.run
If there is an error, don't panic, look at the log
stating that gcc is missing
Execute the gcc installation script
sudo apt-get install build-essential
View installed version
gcc --version
Execute the enhancement script again
5. Add a shared directory
After the configuration is complete, restart the virtual machine
Add a file 1.txt in the host shared directory
Enter the virtual machine to view
So far the shared directory has been implemented.