Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Install VirtualBox Additions on Ubuntu 18.04

DZone's Guide to

Install VirtualBox Additions on Ubuntu 18.04

In this succinct tutorial, we look at how we can add VirtualBox addtitions onto a system running the latest Ubuntu OS.

· Open Source Zone ·
Free Resource

In this post, we will walk through how to install the VirtualBox Additions on Ubuntu 18.04. This will allow you to share the clipboard and drag & drop with your host OS.

Prerequisites

The first step for doing almost anything in Ubuntu is to make sure you are fully up to date:

$ sudo apt update && apt upgrade

After you reboot we can install the required packages.

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

Install the VirtualBox Additions

Now click on Devices then Insert Guest Additions CD Image...


Ubuntu will ask you if you want to run the application. I usually click Cancel here because if anything goes wrong I want to be able to see what the error was.

Click Cancel then open up the Terminal Emulator and sudo to root.

$ sudo su -


Now run the below command to install the VirtualBox Guest Additions:

# /media/{username}VBox_GAs_5.2.12/VBoxLinuxAdditions.run

Reboot Ubuntu and you should now be able to enable Clipboard Sharing and Drag & Drop from the Devices menu.

Note: You will have to go through this procedure each time you update the kernel in Ubuntu or this functionality will quit working.

Also note that I am testing Drag and Drop from a Windows 10 Host to an Ubuntu 18.04 Guest system with VirtualBox Additions installed and bidirectional allowed but it didn't work. The best thing to do is to create a Shared Folder so you can copy files between the systems.

Conclusion

I hope you have enjoyed this article, if so please leave a comment below. For more articles, please signup for the AdminTome Blog below. Thanks again for reading this post.

Topics:
open source ,ubuntu ,copy and paste ,installation ,virtualbox ,virtualbox additions

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}