1. Click the menu bar device –> Assign the optical drive –> Select a virtual disc, locate the Vboxguestadditions.iso in the VirtualBox installation directory, and load the image.
2. Start the Linux system and log into the system as root
3. Execute the Mount command to hang the virtual disc in the/mnt/cdrom, if there is no CDROM directory, create it first.
The code is as follows:
Mkdir/mnt/cdrom
Mount-t Auto-r Ro/dev/cdrom/mnt/cdrom
4. Copy script to/tmp directory
The code is as follows: Cd/mnt/cdrom
CP vboxlinuxadditions.run/tmp
Cd/tmp
chmod a+x Vboxlinuxadditions.run
5. The above scripts need to install tools such as gcc,make,kernel-devel and development kits, executable (Please choose the installation tool according to the actual system, CentOS with Yum, others please select separately)
The code is as follows: Yum install gcc kernel-devel kernel-headeryum install-y gcc gcc-devel gcc-c++ gcc-c++-devel make Kernel-devel
Check version: Yum update
6. Perform the installation (desktop support is not installed here)
The code is as follows:
Sh./vboxlinuxadditions.run--noexec--nox11
7. Rebooting the system
The code is as follows:
Shutdown-r now
8. Add a shared directory
Menu Settings –> Shared folders –> Add folders and set related paths and permissions
9. Mount the shared folder
If you choose to mount automatically, you do not need to perform a step. Shared folders are automatically suspended to/media/sf_share
Pass
The code is as follows:
Mount
You can view the Mount list
You will see the following style:
The code is as follows:
Share On/media/sf_share type vboxsf (GID=500,RW)
Indicates that the automatic mount was successful.
The code is as follows:
Mkdir/mnt/share
Mount-t vboxsf Share/mnt/share
Detailed steps for installing VirtualBox enhancements (enhanced packages) on Linux systems