How to install VirtualBox?

VirtualBox Window

VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL) version 3.

Presently, VirtualBox runs on Windows, Linux, macOS, and Solaris hosts and supports a large number of guest operating systems including but not limited to Windows (NT 4.0, 2000, XP, Server 2003, Vista, Windows 7, Windows 8, Windows 10), DOS/Windows 3.x, Linux (2.4, 2.6, 3.x and 4.x), Solaris and OpenSolaris, OS/2, and OpenBSD.

VirtualBox is being actively developed with frequent releases and has an ever growing list of features, supported guest operating systems and platforms it runs on. VirtualBox is a community effort backed by a dedicated company: everyone is encouraged to contribute, while Oracle ensures the product always meets professional quality criteria.

Installing

Linux

💡
If you have not already installed a Linux distribution, see our tutorials on how to install Kubuntu, a beginner-friendly distro.

In this tutorial, we will see how to install VirtualBox on Kubuntu 22.04. It is also valid for any Ubuntu 22.04 based distro. If you use any other distro, refer to the VirtualBox manual and VirtualBox download page for instructions on how to install it on your specific distro.

VirtualBox is available in Kubuntu repositories. It is also available in repositories of many Linux distros I have used. But most of the time, the repos contain an old version of VirtualBox. So, we will install VirtualBox from Oracle’s repository. First, add the key for the repository. You can download and add the key using this single command:

wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --dearmor --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg

Add Oracle's key
Add Oracle's key

Now we will add Oracle's repository. Run the following command:

sudo nano /etc/apt/sources.list.d/virtualbox.list

Copy the following:

deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian jammy contrib

Press Shift+Ctrl+V to paste it. Then press Ctrl+O to save and Ctrl+X to close the file.

Add Oracle's repository
Add Oracle's repository
💡
If you are using any other LTS version of Ubuntu except 22.04 or if your distro is based on any other LTS version of ubuntu, replace jammy with the codename of your version. If you are using a non-LTS version, replace the jammy with the codename of the last LTS version. Oracle used to provide repositories for non-LTS version, but since 21.10, it stopped doing so.

Update the package index:

sudo apt update

Update the package index
sudo apt update

Now install VirtualBox:

sudo apt install virtualbox-7.0

💡
You can replace `virtualbox-7.0` with other version when it is released. To see a list of versions supported type `sudo apt install virtualbox` and press the TAB key a few times. Do not install `virtualbox` package as it is the old version from Ubuntu repos.
Install VirtualBox
sudo apt install virtualbox-7.0

sudo apt install virtualbox-7.0

Add yourself to the vboxusers group:

sudo usermod -a -G vboxusers username

Replace username with your account username. Now, logout and login back.

Add user to vboxusers group
sudo usermod -a -G vboxusers legacyinstaller

VirtualBox is installed. You can start using it.

VirtualBox
VirtualBox

Windows

💡
You should use Linux. If you don't know how to install a Linux distro, see our tutorials on how to install Kubuntu, a beginner-friendly distro.

If you are on Windows, refer to the VirtualBox manual and VirtualBox download page for instructions on how to install it.

Oracle VM VirtualBox Extension Pack

While VirtualBox is free and open source and hence anyone can use it for free, some features for VirtualBox are released as "Oracle VM VirtualBox Extension Pack". It is not FOSS, but is free for non-commercial use. If you want to use it commercially, you need to get a license from Oracle. To install it, download it from VirtualBox download page.

Open VirtualBox, then click on File > Tools > Extension Pack Manager.

Extension Manager
Extension Manager

Now click on Install and choose the extension pack you just downloaded.

Extension Pack

Click on Install.

License

Scroll down the License and click on I Agree.

Give your password when asked to do so. The installation will start and then complete. That's it.

To go back to the Welcome screen, click on the menu beside the Tools in the sidebar and click on Welcome.

Documentation

If you want to read the VirtualBox manual, you can access it by clicking on Help > Contents... in VirtualBox. You can also read it in your browser here. You can download a PDF copy of the manual from VirtualBox download page.

Credits

Video tutorial

Do you want to follow the tutorial by watching a video? We will post a video on our youtube channel soon.

Archives of this tutorial are available on Wayback Machine.


Tell us about your experience of this page on Discord. Or, just come and chat with us about old software. Join and say “Hi!”:

Discord Banner