Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Ubuntu Server - Install VirtualBox Guest Editions

Execute the script below with BASH.

#!/bin/bash
# mount the cdrom (this will mount in read-only which is ok)
sudo mount /dev/cdrom /media/cdrom

# Install the necessary headers
sudo apt-get install -y dkms build-essential linux-headers-generic linux-headers-$(uname -r)

# now install guest additions
sudo /media/cdrom/VBoxLinuxAdditions.run

You will need to reboot the server for the changes to take effect.

References

Last updated: 16th August 2018
First published: 16th August 2018

This blog is created by Stuart Page

I'm a freelance web developer and technology consultant based in Surrey, UK, with over 10 years experience in web development, DevOps, Linux Administration, and IT solutions.

Need support with your infrastructure or web services?

Get in touch