How to Install VirtualBox Guest Additions in Ubuntu Server 18.04 LTS

July 9, 2018
How to Install VirtualBox Guest Additions in Ubuntu Server 18.04 LTS

“How to Install VirtualBox Guest Additions in Ubuntu Server 18.04 LTS” covers the entire process of installing VirtualBox Guest Additions in an Ubuntu Server 18.04 LTS virtual machine. After installing a virtual machine in VirtualBox, it is important to then install VirtualBox Guest Additions in the virtual machine. The Guest Additions is a group of software that includes device drivers and system applications. VirtualBox Guest Additions will accelerate the performance of the virtual machine, offering better resource utilization and stability among other things. This tutorial assumes that you already have VirtualBox installed and configured on your system. This tutorial also assumes that you have already successfully installed an Ubuntu Server 18.04 LTS virtual machine in VirtualBox. If you have not yet installed Ubuntu Server 18.04 LTS in VirtualBox, please follow this tutorial before continuing with this tutorial.

1. Launch VirtualBox and power on the Ubuntu Server virtual machine. When the server boots, log in to access the virtual machine.

How to Install VirtualBox Guest Additions in Ubuntu Server 18.04 LTS

2. Once logged into the terminal of the virtual machine, click the ‘Devices’ tab at the top of the virtual machine’s terminal. Select ‘Insert Guest Additions CD Image’ from the dropdown.

How to Install VirtualBox Guest Additions in Ubuntu Server 18.04 LTS

3. The VirtualBox Guest Additions CD Image will now be inserted into the virtual cd drive of the virtual machine. The virtual CD-ROM must be mounted before we can see the contents of the CD image. Mount the device with the following command:

sudo mount /dev/cdrom /mnt
How to Install VirtualBox Guest Additions in Ubuntu Server 18.04 LTS

4. The CD image is now mounted at /mnt. To enter the directory, enter the following command:

cd /mnt
How to Install VirtualBox Guest Additions in Ubuntu Server 18.04 LTS

5. Enter the following command to view the contents of the VirtualBox Guest Additions CD Image:

ls
How to Install VirtualBox Guest Additions in Ubuntu Server 18.04 LTS

6. Before installing the Guest Additions package, we must make sure that all dependencies that are required are installed. To install the dependencies, enter the following command:

sudo apt-get install -y dkms build-essential linux-headers-generic linux-headers-$(uname -r)
How to Install VirtualBox Guest Additions in Ubuntu Server 18.04 LTS

7. Once the necessary packages finish installing, switch to the root user by entering the following command followed by your sudo password:

sudo su
How to Install VirtualBox Guest Additions in Ubuntu Server 18.04 LTS

8. Now that we are using the root user, we have the necessary permissions to execute the VirtualBox Guest Additions installer. To execute the installer, enter the following command into the terminal:

./VboxLinuxAdditions.run
How to Install VirtualBox Guest Additions in Ubuntu Server 18.04 LTS

9. VirtualBox Guest Additions will begin installing. We are notified that the process may take a while. We are then prompted to restart the machine to apply the changes.

How to Install VirtualBox Guest Additions in Ubuntu Server 18.04 LTS How to Install VirtualBox Guest Additions in Ubuntu Server 18.04 LTS

10. Now that VirtualBox Guest Additions are installed, restart the virtual machine by entering the following command:

reboot
How to Install VirtualBox Guest Additions in Ubuntu Server 18.04 LTS

11. The Ubuntu Server 18.04 LTS virtual machine will reboot and apply the VirtualBox Guest Additions package. Congratulations! The installation of VirtualBox Guest Additions in the Ubuntu Server 18.04 LTS virtual machine is complete. Log in to your virtual machine after it reboots and begin reaping all of the benefits of the Guest Additions package.

How to Install VirtualBox Guest Additions in Ubuntu Server 18.04 LTS