How to Install VirtualBox Guest Additions on Linux
VirtualBox is a type-2 hypervisor that allows users to run multiple operating systems on a host computer. It can be installed on Windows, macOS, and Linux operating systems. One of the features of VirtualBox is the ability to install Guest Additions, which enhances the guest operating system’s performance and functionality on the host computer. This article will guide you on how to install VirtualBox Guest Additions on Linux.
Requirements:
Before starting the installation process, ensure that you fulfill the following requirements:
– A Linux distribution installed on VirtualBox
– VirtualBox installed on the host computer
– A sudo user with administrative privileges on the guest Linux operating system
Step 1: Update the Guest Operating System
It is always a good practice to update the guest operating system before installing any guest additions. To update the Linux system, you can open the terminal and run the following command:
$ sudo apt update && sudo apt upgrade
Step 2: Mount the VirtualBox Guest Additions ISO File
The VirtualBox Guest Additions ISO file contains the required software packages to install the guest additions. To mount the ISO file, click on “Devices” from VirtualBox’s menu bar and then click “Insert Guest Additions CD image.” Alternatively, you can run the following command from the terminal:
$ sudo mount /dev/cdrom /mnt
Step 3: Install the Required Dependencies
To install the required dependencies, you can run the following command:
$ sudo apt-get install build-essential dkms linux-headers-generic
Step 4: Run the VirtualBox Guest Additions Installer
To run the installer, navigate to the mounted ISO file directory, which is usually located at /media/$USER/VBox_GAs_*. Run the following command:
$ sudo sh ./VBoxLinuxAdditions.run
The installer will compile and install the corresponding software packages for the guest operating system. Once the installation is complete, restart the guest operating system.
Step 5: Check the Guest Additions Status
After restarting the guest operating system, you can check the status of the guest additions by running the following command:
$ sudo service vboxadd status
If the output indicates that the service is running, then the guest additions have been successfully installed.