Some drivers can be install on the VirtualBox for the better performance of the operating system. You can install guest additions for Ubuntu on VirtualBox by executing simple commands.
After the installation of the guest additions on Ubuntu 22.04, the users will experience the features including:
- Full-screen resolution of Ubuntu 22.04
- Drag and Drop option of the VirtualBox
- Copy files and scripts from the host operating system to Ubuntu
The installation of them on Ubuntu in VirtualBox is relatively easy. Let’s discover the way of installing guest additions on Ubuntu VirtualBox.
How to Install Guest Additions on Ubuntu VirtualBox?
To install them on Ubuntu VirtualBox using the terminal, first, open the terminal of Ubuntu. After opening the terminal, execute the command mentioned below to install “build-essentials” and “Linux headers”:
$ sudo apt install build-essential linux-headers-$(uname -r) -y
Install the Guest Additions on Ubuntu 22.04 VirtualBox 7.0
To install the Guest Additions on Ubuntu 22.04 VirtualBox, follow the below-mentioned steps:
Step1: Create a Directory to Mount
Create a directory with the “mkdir” command to mount the iso image. This directory should be created at /mnt/cdrom with the “-p” flag:
$ sudo mkdir -p /mnt/cdrom
Step 2: Insert the Guest Additions CD image
Click on “Devices”, and then click on “Insert the Guest Additions CD image..” from the drop-down menu:
Step 3: Mount the ISO Image of VirtualBox
Now mount the ISO image of the VirtualBox on the newly created directory using the command:
$ sudo mount /dev/cdrom /mnt/cdrom
Step 4: Navigate to the /mnt/cdrom Directory
Now navigate to the /mnt/cdrom directory using the “cd command”:
$ cd /mnt/cdrom
Step 5: Run the Script of “VBoxLinuxAdditions.run”
In the newly created directory, run the script of the VBoxLinuxAdditions.run using the command:
$ sudo sh ./VBoxLinuxAdditions.run --nox11
Step 6: Restart the Ubuntu 22.04
Finally, restart Ubuntu 22.04 to apply the new changes:
$ reboot
Guest additions are installed on Ubuntu VirtualBox successfully. Now run the “Full-Screen Resolution” to confirm the installation:
The full-screen resolution is unlocked after the installation of the guest additions on Ubuntu VirtualBox.
Conclusion
To install the guest additions on Ubuntu VirtualBox, first, insert the ISO image of the VirtualBox, then mount them in some directory and run the script. Though all these steps are explained in detail in this blog. After running all the steps explained in the blog, readers will be able to install the guest additions on Ubuntu VirtualBox.