How To Install VirtualBox Guest Additions On Ubuntu 20.04
VirtualBox guest additions is a collection of device drivers and software application package which is shipped with Oracle VirtualBox. They need to be installed inside a VM to improve the performance of the guest operating system and to add extra features.
Features
- Mouse pointer integration – By default, VM will capture your mouse and keyboard when you are working inside a VM. You need to press the Ctrl key to release the capture. Installing guest additions will provide you with seamless mouse support to overcome the capturing of mouse and keyboard.
- Shared folders – Exchange files between the host and the VM
- Better video support – _VM machine’s screen resolution will automatically change to the size of the VirtualBox window. _
- Seamless windows – Windows that are displayed within a virtual machine appear side by side next to the windows of your host.
- Generic host/guest communication channels – Enable you to control and monitor guest execution
- Time synchronization – Guest’s system will use the host time for time synchronization.
- Shared clipboard
- Automated logins – Automated guest login using credentials from a master login system
You can read more about guest additions here.
Here, we will see how to install VirtualBox guest additions on Ubuntu 20.04.
Install Guest Additions On Ubuntu 20.04
VirtualBox guest additions are stored in an ISO image VBoxGuestAdditions.iso format inside the VirtualBox installation directory. To install the Guest additions, you need to mount the ISO image in your VM.
Prerequisites
Install the build tools and kernel headers for the current kernel.
sudo apt update
sudo apt install -y build-essential linux-headers-$(uname -r)
Install Guest Additions
After attaching VirtualBox guest additions ISO image, install it either using a terminal or graphical mode.
Using Terminal
On the VM window, go to Devices » Insert Guest Additions CD Image.
Open a terminal Ctrl+Alt+T and mount the ISO image to /media directory.
sudo mount /dev/cdrom /media
Execute the VirtualBox guest addition installer.
cd /media
sudo ./VBoxLinuxAdditions.run
Even before the installation gets complete, your system will get the full-screen view which confirms that the installation is successful.
You may reboot your system to complete the installation.
sudo reboot
Using Graphical Interface
On the VM window, go to Devices » Insert Guest Additions CD Image.
As soon as you attach the guest additions image to a VM, you will get a prompt to run the automatic installation. Click Run.
You may need to enter your user password to authorize the installation.
Even before the installation gets complete, your system will get the full-screen view which confirms that the installation is successful.
You may reboot your system to complete the installation.
Conclusion
That’s All. I hope you have installed guest additions on Ubuntu 20.04. Please share your feedback in the comments section.