How to install VirtualBox and Guest Additions in Ubuntu

VirtualBox is a powerful tool to test new operating systems, notably different Linux flavors, without changing your host computer's partitions.

Oracle VM VirtualBox is a free, open-source, and powerful virtualization product for enterprise and personal use. With frequently released versions, VirtualBox is actively being developed and has a growing list of features, supported guest OS, and platforms.

For those new to virtualization software, it installs on your existing computer, whether running Linux, Windows, or Mac OS X and extends your current computer’s capabilities so that it can run multiple OSes simultaneously in numerous virtual machines. You can install as many virtual machines as you like. The only practical limits are disk and memory.

Installing VirtualBox on Ubuntu

There are a couple of ways to install VirtualBox on your computer. The easiest method is to install it from the Ubuntu Software Center, but usually, these are updated slowly, so you will often find older versions. The best way to install the latest VirtualBox on Ubuntu is by downloading it directly from the Oracle website.

Step 1) Head over to this link and download the .deb file corresponding to your Ubuntu version. In my case, I’m using Ubuntu 19.04, so the downloaded file is “virtualbox-6.0_6.0.6-130049_Ubuntu_bionic_amd64.deb” as of today. Your downloaded version may be different depending on when you are downloading.

Step 2) The file is directly executable in Ubuntu. Simply double-click on it.

Step 3) Click “Install.”

Install VirtualBox
Installing VirtualBox 6.0 on Ubuntu 19.04

Step 4) Enter the root password when prompted to complete the installation.

Step 5) You can launch Oracle VirtualBox from the Applications menu.

That’s it! Go ahead and create your first Virtual machine by clicking on “New”.

Create New Virtual Machine
Create a New Virtual Machine

Installing VirtualBox Guest Additions on Ubuntu

The VirtualBox Guest Additions are composed of device drivers and systems applications to improve the performance and usability of the operating system. Installing this package is highly recommended to get the best out of your Virtual Machine. Please note that guest additions are installed on the Virtual machine, and you must, therefore, install them on each of the virtual machines you have created.

In this example, I’m installing the Guest Additions package on Ubuntu 19.04 virtual machine.

Step 1) Click-through “Devices”>”Insert Guest Additions CD image…”

Install Guest Additions CD Image
Install Guest Additions CD Image

Step 2) Click “Run.”

Continue Setup
Continue Setup

Step 3) Follow the on-screen instructions to complete the installation.

Getting this error while installing the VirtualBox Guest Additions?

This system is currently not set up to build kernel modules. Please install the gcc make perl packages from your distribution.

To fix this problem, launch a new terminal and enter the below command to install the missing packages:

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

After installing the essential packages, restart your Ubuntu on the VirtualBox and then try Step (1) and (2).

Bonus tips for a better experience with VirtualBox

For the best experience, we suggest you check out the following features of the VirtualBox.

1. Enabling Shared Clipboard

While working between the host and the virtual machine, you may feel the need for copying and pasting the text. For achieving this, you must enable “Shared Clipboard.”

To enable the feature, right-click on the virtual machine and select “Settings.”

Next, click on the “Advanced” tab and select “Bidirectional” for both “Shared Clipboard” and “Drag’n’Drop.”

Shared Clipboard
Shared Clipboard

Click, “OK.” You should now be able to share your clipboard between the host and the virtual machine.

2. Add a Shared Folder

Another significant enhancement is to create a folder on your host and share it with the virtual machine for transferring files between them.

Click on “Folder Settings” in the right-click options on the Virtual machine. Then, click on the icon to that says “Adds new shared folder.”

Add Shared Folder
Add Shared Folder

Set a folder path on your host and provide the path in the “Folder Path” field. Check the boxes “Auto-mount” and “Make Permanent” to avoid the hassle of doing the same thing all over again and again. Optionally, you can select the “Read-only” option if you want.

Setup Shared Folder
Setup Shared Folder

Click “OK” to save the settings. Launch File Manager, and you should see the shared folder.

File Manager
File Manager

Upon opening it, you will see a prompt for the root password of the virtual machine. Enter the password to view the shared content.

Shared Folder
Shared Folder


This concludes our tutorial on installing VirtualBox and guest additions package on your Ubuntu machine. VirtualBox is a powerful tool to test new operating systems, notably different Linux flavors, without fiddling with computer partitions. VirtualBox Guest Additions also improve the experience of achieving a compelling performance by installing needed drivers for the virtual machine. As discussed, it also includes convenient folder sharing and clipboard sharing between the host and your virtual machines.

Kiran Kumar
Hi there! I'm Kiran Kumar, founder of I'm an avid Linux lover and enjoy hands-on with new promising distros. Currently, I'm using Ubuntu as a daily driver and run several other distros such as Fedora, Solus, Manjaro, Debian, and some new ones on my test PC and virtual machines. I have a day job as an Engineer, and this website is one of my favorite past time activities, especially during Winter ;). When I'm not writing for FOSSLinux, I'm seen biking and hiking on scenic trails. I hope you enjoy using this website as much as I do writing for it. Feedback from readers is something that inspires me to do more and spread Linux love!. If you find a time, drop me an email or feedback from the 'Contact' page. Or simply leave a comment below if you found this article useful. Have a good day!


Please enter your comment!
Please enter your name here




Top 10 Reasons to use Xfce as your Desktop Environment

There are many choices for desktop environments for Linux based operating systems. Mainly, you can install any DE of your choice on most of the Linux based distributions, even if they are not offered as a package officially. In our recent articles, we discussed the best of KDE and Cinnamon. In this article, we wish to present to you the top reasons why you should consider Xfce as your desktop environment.

The 10 Best Linux Network Monitoring Tools

Having total control over your network is essential to prevent programs from overusing your network resources and slowing down the overall performance. This is why you should install a network monitoring tool on your system, giving you a visual overview of everything that's happening on your network. Networking Tools are like swiss-knife for the system administrators for troubleshooting system issues.

How to install CouchPotato on Ubuntu

Downloading movies and copying them over to your home server can get frustrating, especially if you are doing it daily! What if you have an option to download videos automatically, quickly, and above all with excellent quality. CouchPotato allows you to download movies easily once they are available and released automatically.

Top 20 Rsync Examples in Linux

The Rsync (remote sync) command is a Linux/Unix utility used to synchronize and copy files and directories either locally or remotely. Most Linux geeks use Rsync to mirror, backup or migrate data across folders, across disks and networks. One notable feature with the Rsync command is that it uses the "delta transfer algorithm."

Setting up NFS Server on Ubuntu Server

We have put together a detailed step-by-step tutorial that will guide you on how to install and set up NFS Server on Ubuntu so you too can start sharing data with other client systems. It is divided into sections, the first part discussing how to set up the host server and the second part showing you how to set up the client-side. For this tutorial, we will be using Ubuntu 20.04 LTS.

Crontab in Linux Explained With Examples

Crontab is the Linux equivalent of the Window's Task Scheduler. It can help you set up a task to run automatically at a regular...


Linux is growing faster than ever. As per the latest report, there is a drop in the Windows 10 market share for the first time, and Linux's market share has improved to 2.87% this month. Most of the features in the list were rolled out in the Pop OS 20.04. Let's a detailed look into the new features, how to upgrade, and a ride through video.
Elementary OS 5.1 Hera has received a point release with a handful of new features and bug fixes, and we will be reviewing the significant changes in this article. For those new to elementary OS, this Ubuntu-based Linux distribution uses their inhouse built Pantheon desktop environment and AppCenter.

6 Best Linux Distros for Programmers and Developers

Linux distros have long been a favorite among programmers since the rise in popularity of the OS in the nineties. Programmers are technical by nature, and Linux distros appeal to that technical nature. Let's discuss why Linux is a great desktop OS for programmers and developers, and find out best distros suitable for them.

How to dual-boot Ubuntu and Fedora on your PC

Every Linux distribution has its capabilities and preferences as per the user requirements. That brings forth the need to run different distros on one laptop. For example, a CyberSecurity enthusiast might prefer to use Ubuntu for development and Kali Linux for penetration testing.

6 Best Linux Distributions for Beginners

Making the shift to Linux is not as complicated as some people make it out to be. There is a variety of Linux distributions available that cater to the needs of people who are planning on making the jump to Linux from any other operating system.

What’s New in Ubuntu 20.04 LTS “Focal Fossa”

Ubuntu 20.04 LTS is out now! This is the successor to Ubuntu 18.04, which was released in April 2018 and still has three years of official support left. Code-named Focal Fossa, the new edition has all the bells and whistles included in it, making it one of the best Ubuntu releases yet. Let's find out more.