The Complete VirtualBox Installation Guide for Ubuntu (2024)

VirtualBox is an open-source virtualization tool made by Oracle. It allows users the freedom to create and use multiple virtual machines on their systems. Using VirtualBox, you can run different operating systems on the same machine, experiment with any tool or technology you like, develop and test your ideas, and try new configurations without harming your primary operating system.

You will use the command line to install the VirtualBox on your Ubuntu system. It is recommended always to install VirtualBox using the official repository of Oracle as it contains the up-to-date, ready-to-install release.

The Complete VirtualBox Installation on Ubuntu

Before starting the installation process, first update and upgrade the system package repositories so that the system can run on the most recent updates. To do that, run the following commands:

sudo apt update

The update command will download the package information for currently installed packages on the system.

sudo apt upgrade

The upgrade command will upgrade all the installed packages to the latest releases.

Add VirtualBox Repositories

The VirtualBox is not a part of the default Ubuntu package repositories. To download the VirtualBox, you will need to import the package and the repository keys and to do that, you will have to run the following commands in your terminal windows:

sudo apt install curl wget gnupg2 lsb-release -y


curl -fsSL https://www.virtualbox.org/download/oracle_vbox_2016.asc|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/vbox.gpg

curl -fsSL https://www.virtualbox.org/download/oracle_vbox.asc|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/oracle_vbox.gpg

These commands will download the public keys from Oracle and install them onto your system. After completing the above step, run the following command to add these public keys to your system’s trusted keys repository. 

echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list

Trusted keys are used to verify and validate the package’s integrity when the Oracle file is installed in your system.

Install VirtualBox on Ubuntu

The next step is to install VirtualBox on your system and to do that, and you will have to run the following commands:

sudo apt update
sudo apt install -y linux-headers-$(uname -r) dkms

sudo apt install virtualbox-7.0 -y

After executing these commands, your VirtualBox is now installed onto your Ubuntu system.

Run VirtualBox

After completing the installation process, let’s run our newly installed VirtualBox. To do that, click on the applications and write “VirtualBox” in your searchbox.

Click on its icon from the application tray to open the VM Virtual Box:

Your VirtualBox is now installed and running on your system.

Install VirtualBox Extension Pack

Before you start creating your virtual machines, it is better to install the extension pack. The extension pack will add more functionalities to the VirtualBox, like USB 2.0 and 3.0 support, disk encryption, PXE boot, and more.

To Install the extension pack for your VirtualBox, you will first need to download it by using this command:

wget https://download.virtualbox.org/virtualbox/7.0.10/Oracle_VM_VirtualBox_Extension_Pack-7.0.10.vbox-extpack

Once you have downloaded the extension pack now, it’s time to install the package, and to do that, you will be running the following command:

sudo vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-7.0.10.vbox-extpack

During the installation process, you will be asked to accept the license agreement, write “Y,” and press enter to continue the installation process. Once your extension pack is installed, verify it by running the VirtualBox, clicking on three dots next to tools, and selecting the extension package.

Your extension package is now ready to use.

Add a New Local User for VirtualBox

When multiple users are assigned to the same project and need to use the same VirtualBox, instead of giving everyone sudo privileges, you can create a group for VirtualBox users and add local users there. They can use only the VirtualBox with sudo privileges.

To do that, run the following commands:

sudo usermod -aG vboxusers $USER
newgrp vboxusers

With this command, you have created a group for VirtualBox users, and all users have now been added to “vboxusers” with sudo privileges to access the VirtualBox. 

Dracula’s High-Performance Sneaker Bot Servers

Score limited-edition kicks and stay ahead in the game with our high-performance Sneaker Servers. Designed for sneakerheads and resellers, these servers offer blazing-fast speeds and unwavering stability. Never miss a release again with DraculaServers’ Sneaker Servers by your side. Level up your sneaker-copping game now.

Ready to secure the freshest kicks? Discover the power of our Sneaker Servers Here! Don’t let slow servers hold you back—unleash your sneaker-bot’s potential with DraculaServers today.

Check out Sneaker Servers Here!

How to Uninstall the VirtualBox in Ubuntu?

You can also install the VirtualBox in case you want to use another application or a different version of the VirtualBox you can do it by running the following command in your terminal window:

sudo apt remove virtualbox virtualbox-*

This command will uninstall VirtualBox from your system. However, if you are looking to remove the VirtualBox with its repositories and keys completely, then you can use this command:

sudo apt autoremove --purge virtualbox-7.0

However, it is not recommended to remove everything if you are looking forward to reinstalling the application.

FAQ

If you have some unanswered questions regarding the installation of VM VirtualBox on Ubuntu, take a look below:

Is VirtualBox free to use on Ubuntu?

VirtualBox is an open-source and free-to-use application made by Oracle. You can use it for both personal and commercial purposes. 

Can I install VirtualBox directly from the Ubuntu Software Center?

Yes, VirtualBox can be installed from the Ubuntu software center. However, to install the latest and most updated version, you must install it from Oracle’s official repository.

Does VirtualBox work with Ubuntu?

VirtualBox works with every operating system out there, and Ubuntu is no exception. You can use VirtualBox on Ubuntu.

Where can I find additional support for VirtualBox on Ubuntu?

You can find the additional support on VirtualBox’s official website and official documentation.

Wrap up

VirtualBox is a powerful tool for using multiple virtual machines on a single system. You can use it to develop and test new protocols, software, and antivirus or just to use multiple operating systems. You have just learned how to install and set up VirtualBox on your Ubuntu system.

Read More Linux Guides Here!

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments