How to install VirtualBox Guest Additions on Ubuntu

How to install VirtualBox Guest Additions on Ubuntu

Oracle VirtualBox is a software that lets you emulate guest systems under a virtual environment with your same hardware.

VirtualBox guest additions is a set of drivers and applications shipped with VirtualBox that enhance the performance of the guest OS, which includes mouse pointer integration, time synchronization between the host and the guest OS and accelerated video performance, also it adds some features like bidirectional clipboard, drag and drop as well as other useful features.

This article explains how to install VirtualBox guest additions on Ubuntu. There are two methods to achieve that,

Install VirtualBox Guest Additions Using the GUI

word image 211

Open VirtualBox and start the machine.

Open a terminal either graphically or by pressing t while holding both Ctrl and Alt keys.

You need to update your apt package list and upgrade all the software installed on your machine:

sudo apt update
sudo apt upgrade

Then install some packages that are necessary for installing guest additions.

word image 212

sudo apt install build-essential dkms linux-headers-$(uname -r)

Now reboot your machine.

If you installed VirtualBox the standard way, then you have an empty virtual optical drive. You just need to open devices menu within VirtualBox, and then select insert guest addition CD image.

word image 213

word image 214

After that Ubuntu will automatically mount the CD, and it will ask you whether you want to execute an automatic software, select run.

Type-in your password.

word image 215

Wait for installation to complete and hit enter.

Now reboot your machine again for changes to take effect.

Install VirtualBox Guest Additions Using the Command-Line

Open VirtualBox and start Ubuntu.

Update your apt package list and upgrade all of your software (run these commands in a terminal):

sudo apt update
sudo apt upgrade

Then install some packages that are necessary for installing guest additions.

word image 216

sudo apt install build-essential dkms linux-headers-$(uname -r)

Reboot your virtual machine:

sudo reboot

Attach Guest additions CD image from the Devices menu.

word image 217

Open a terminal, create a new directory to be a mount point for the CD image we just attached, and mount /dev/cdrom in that directory.

sudo mkdir /mnt/my_cd
sudo mount /dev/cdrom /mnt/my_cd

word image 218
Be sure to cd into the /mnt/my_cd directory, and execute guest additions installation script using as root.

word image 219

sudo ./VBoxLinuxadditions.run

Now reboot your virtual machine; because there were some changes in the kernel.

sudo reboot

Conclusion

­VirtualBox guest additions is a great way to enhance the performance and improve your experience using VirtualBox, there were two easy ways to install guest addition, follow what you are comfortable with.

0 Shares:
Subscribe
Notify of
guest
Receive notifications when your comment receives a reply. (Optional)
Your username will link to your website. (Optional)

0 Comments
Inline Feedbacks
View all comments
You May Also Like
Rsync Syntax and Ubuntu Logo on Purple Gradient Background
Read More

Install and Use Rsync on Ubuntu

The rsync command is an open source utility that provides fast and versatile file transfer and synchronization. It…