How to install or upgrade VirtualBox on Ubuntu or Debian

Last updated on August 13, 2020 by Dan Nanni

VirtualBox is a cross-platform virtualization software package for x86 architecture. A nice thing about VirtualBox is that it has several quite useful features, not available on other similar software such as VMware Player, which include: virtual machine snapshots. disk image conversion and support (e.g., VMware's VMDK, Microsoft's VHD, Apple's DMG), guest machine cloning, etc.

Install VirtualBox on Ubuntu or Debian

First, use the following command to add the official repository of VirtualBox to your Linux system. This command will automatically determine the release version of your Ubuntu or Debian, and update /etc/apt/sources.list file accordingly.

$ sudo sh -c "echo 'deb '$(lsb_release -cs)' contrib non-free' > /etc/apt/sources.list.d/virtualbox.list"

Next, add the GPG key of this repository:

For Debian 8 and Ubuntu 16.04 or later:

$ wget -q -O- | sudo apt-key add -

For older Debian/Ubuntu:

$ wget -q -O- | sudo apt-key add -

Now, check what version of VirtualBox is available in the repository:

$ apt search "virtualbox-"

Finally, go ahead and install the latest VirtualBox, which is version 6.0 in this example.

$ sudo apt install virtualbox-6.0

Upgrade VirtualBox on Ubuntu or Debian

If you want to upgrade current VirtualBox (e.g., version 6.0), go to File → "Check for Updates" on VirtualBox GUI menu. For older versions of VirtualBox, you may find it under Help → "Check for Updates".

If there is any new version of VirtualBox available (e.g., version 6.1), you will see the following pop-up window. This window can also pop up automatically when launching VirtualBox any time.

The easiest way to upgrade VirtualBox is to use the default package manager apt. Installing a newer version of VirtualBox with apt will automatically remove the old version of VirtualBox.

$ sudo apt install virtualbox-6.1

Upgrade VirtualBox Extension Pack

When you restart VirtualBox after upgrade, you may be asked to upgrade VirtualBox Extension Pack as well. Click on "Download" to proceed.

Download the latest VirtualBox Extension Pack.

Install the latest VirtualBox Extension Pack.

When prompted, go ahead and upgrade VirtualBox Extension Pack.

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal or credit card

Please note that this article is published by under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at as the original source.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean