How to Install VirtualBox 7 on Ubuntu 24.04 LTS

Follow our step-by-step guide to easily install VirtualBox on Ubuntu 24.04 LTS (Noble Numbat) and start virtualizing your systems today!

This guide is tailored specifically for Ubuntu 24.04 LTS (Noble Numbat) users, the latest long-term support release from one of the most popular Linux distributions. By following our simple step-by-step instructions, you’ll be able to install VirtualBox seamlessly on your Ubuntu system in no time.

VirtualBox is a powerful yet free virtualization software that is quite popular among home users. It offers a versatile platform for running multiple operating systems simultaneously on a single machine.

It is available for installation in the Ubuntu 24.04 repositories, but the version there is often not up to date. Because of this, this guide will walk you through the steps to install it directly from the official VirtualBox repository.

This ensures you always have the latest version, and the best part is that updates will be included with your regular Ubuntu system updates. So let’s get started.

Step 1: Import VirtualBox’s Repo GPG Key

First, we’ll import the GPG key from the VirtualBox repository to ensure the authenticity of the software we install from it.

wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --dearmor --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpgCode language: Bash (bash)
Import VirtualBox’s repository GPG Key.
Import VirtualBox’s repository GPG Key.

Step 2: Add VirtualBox Repository

Next, we’ll add the official VirtualBox repository to our Ubuntu 22.04 system. If a new version is released, the update package will be made available with the rest of your system’s regular updates.

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] http://download.virtualbox.org/virtualbox/debian $(. /etc/os-release && echo "$VERSION_CODENAME") contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.listCode language: Bash (bash)
Add VirtualBox Repository for Ubuntu 24.04 LTS.
Add VirtualBox Repository for Ubuntu 24.04 LTS.

Step 3: Run System Update

Before we proceed with VirtualBox installation on our Ubuntu 24.04 system, we should refresh the list of available packages. Run the below command to update the APT repositories index.

sudo apt updateCode language: Bash (bash)
Updating the list of available packages.
Updating the list of available packages.

As you can see, our new VirtualBox repository is now available and ready to be used.

Step 4: Install VirtualBox 7 on Ubuntu 24.04 LTS

We’re all set to install VirtualBox on our Ubuntu 24.04 system. Run the following commands:

sudo apt install virtualbox-7.0Code language: Bash (bash)

Type “Y” to confirm and press “Enter.”

Installing VirtualBox on Ubuntu 24.04 LTS (Noble Numbat).
Installing VirtualBox on Ubuntu 24.04 LTS (Noble Numbat).

Wait for the installation to complete. Congratulations, we are done! But hold on before you run it – we have a few little but important things to take care of first.

Step 5: Install VirtualBox Extension Pack

This is an optional step, but I strongly encourage it because it will make working with VirtualBox on your Ubuntu system easier and more convenient. VirtualBox Extension Pack unlocks many great features, such as:

  • USB 2 and USB 3 support
  • VirtualBox Remote Desktop Protocol (VRDP)
  • Host webcam passthrough
  • Disk image encryption with AES algorithm
  • Intel PXE boot ROM
  • Support for NVMe SSDs

Let’s highlight one peculiarity here. The Extension Pack’s version is strongly recommended to match the VirtualBox’s installed version. To verify the exact one of the just-installed VirtualBox, you can use a build-in vboxmanage command:

vboxmanage -v | cut -dr -f1Code language: Bash (bash)
Check the installed VirtualBox version.
Check the installed VirtualBox version.

As you can see, the version of VirtualBox installed is “7.0.18.” Therefore, you must then download the Extension Pack with the same version. So, use the below wget command to download the appropriate Extension Pack for VirtualBox.

However, if your installation is different, replace both places containing “7.0.18” in the command below with the appropriate version. You can also visit the downloads page and look at the available versions.

wget https://download.virtualbox.org/virtualbox/7.0.18/Oracle_VM_VirtualBox_Extension_Pack-7.0.18.vbox-extpackCode language: Bash (bash)

Next, to install the VirtualBox Extension pack, run the vboxmanage command as follows:

sudo vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-7.0.18.vbox-extpackCode language: Bash (bash)

You will be prompted to agree to Oracle’s license terms and conditions. To confirm, type “y” and press “Enter.”

Install VirtualBox Extension Pack.
Install VirtualBox Extension Pack.

Additionally, you can verify installed VirtualBox’s extension pack version by running the following:

vboxmanage list extpacksCode language: Bash (bash)
Verify the installed VirtualBox Extension Pack version.
Verify the installed VirtualBox Extension Pack version.

Step 6: Add User to vboxusers Group

Before using VirtualBox, add your user account to the “vboxusers” group. This is quick and simple to accomplish by running:

sudo usermod -aG vboxusers $USERCode language: PHP (php)

Now, perform a reboot. After login, check that you are in the “vboxusers” group with this command:

groups $USERCode language: PHP (php)
Check the user’s groups.
Check the user’s groups.

Step 7: Running VirtualBox on Ubuntu 24.04

You can start using VirtualBox by launching it from the Ubuntu Dash. Search for “virtualbox” and launch it when its icon appears.

Starting VirtualBox.
Starting VirtualBox.
VirtualBox is installed and runs on Ubuntu 24.04 LTS.
VirtualBox is installed and runs on Ubuntu 24.04 LTS.

Hit the “New” button and start virtualizing your ideas!

Conclusion

Now, with VirtualBox installed on your Ubuntu 24.04 system, you are well equipped with the power to run multiple operating systems and test applications in safe, isolated environments.

In addition, I recommend checking the official documentation for individuals who want to learn more about VirtualBox’s features and how to use them effectively.

I hope this guide has been informative and helpful in getting you started with VirtualBox on Ubuntu. Thanks for your time! Your feedback and comments are most welcome. Happy virtualizing!

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%