Gaming industry under DDoS attack. Get DDoS protection now. Start onboarding

Products

  1. Home
  2. Developers
  3. How to Install VirtualBox on Ubuntu 22.04

How to Install VirtualBox on Ubuntu 22.04

  • By Gcore
  • May 23, 2023
  • 2 min read
How to Install VirtualBox on Ubuntu 22.04

In this guide, we will delve into the steps required to install VirtualBox on Ubuntu 22.04, a popular choice for running multiple operating systems on a single machine.

Understanding VirtualBox

Oracle VM VirtualBox, a free software virtualization tool, empowers you to create and manage multiple virtual machines. It’s an ideal solution for Linux users interested in running different operating systems without the need for additional physical resources. A significant advantage of VirtualBox is its ability to effortlessly switch between operating systems without rebooting your device, which can contribute to considerable hardware cost savings.

Install VirtualBox on Ubuntu 22.04

1. Update your system’s package cache. This command refreshes the list of available packages and their versions from the repositories configured on your system:

sudo apt update

2. Import VirtualBox package repositories keys. These commands download Oracle’s public keys and add them to your system’s list of trusted keys. These keys are used to verify the integrity of the packages you download from Oracle’s repositories:

$ curl https://www.virtualbox.org/download/oracle_vbox_2016.asc | gpg --dearmor > oracle_vbox_2016.gpg$ curl https://www.virtualbox.org/download/oracle_vbox.asc | gpg --dearmor > oracle_vbox.gpg$ sudo install -o root -g root -m 644 oracle_vbox_2016.gpg /etc/apt/trusted.gpg.d/$ sudo install -o root -g root -m 644 oracle_vbox.gpg /etc/apt/trusted.gpg.d/

3. Add the VirtualBox repository. This command adds Oracle’s VirtualBox repository to your system’s list of repositories.:

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

4. Install VirtualBox and its required dependencies with these commands:

sudo apt updatesudo apt install -y linux-headers-$(uname -r) dkmssudo apt install virtualbox-7.0 -y

5. (Optional) For enhanced functionality such as USB 2.0 and 3.0 support, PXE boot for Intel network cards, disk encryption, and VirtualBox Remote Desktop Protocol (RDP), consider installing the VirtualBox Extension Pack. Here’s how you can download and install it:

wget https://download.virtualbox.org/virtualbox/7.0.0/Oracle_VM_VirtualBox_Extension_Pack-7.0.0.vbox-extpacksudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-7.0.0.vbox-extpack

Note: Replace “7.0” with the latest version of VirtualBox when you’re installing it.

Once the installation is complete, you’re all set to explore the versatility of VirtualBox on Ubuntu 22.04.

Conclusion

Looking to deploy Linux in the cloud? With Gcore Cloud, you can choose from Basic VM, Virtual Instances, or VPS/VDS suitable for Linux:

Choose an instance

Related articles

What Is a High Availability Server?

Every minute your servers are down, your business is bleeding. For e-commerce sites, healthcare platforms, and revenue-critical applications, an outage isn't just an inconvenience. It's a direct hit to your bottom line, your reputation, and

Cloud vs Dedicated Server: Which Is Right for You?

Your server choice could be quietly costing you, or quietly holding you back. Pick the wrong infrastructure for your workload and you're either overpaying for idle hardware every month or watching your site buckle under traffic spikes you c

VPS vs Dedicated Server
VPS vs Dedicated Server: Which One Do You Need?

Your site is humming along fine, until it isn't. Traffic spikes, page loads crawl, and your hosting plan buckles under pressure right when it matters most. Choosing between a VPS and a dedicated server isn't just a technical checkbox. It's

Multi-Cloud Plan: What It Is and How It Works

Your cloud provider goes down. Applications fail. Customers can't access your services. And because you've built everything around a single vendor, there's nothing you can do but wait. For organizations locked into one cloud platform, this

Vendor Lock-In in Cloud Computing: What It Is and How to Avoid It

Imagine discovering that migrating your company's data to a new cloud provider will cost hundreds of thousands of dollars in egress fees alone, before you've even touched the re-engineering work. Or worse, picture being in Synapse Financial

What Is Sovereign Cloud and Why Does It Matter?

Picture this: a foreign government issues a legal order forcing your cloud provider to hand over sensitive patient records, classified research data, or critical national infrastructure details. You can't stop it. This isn't hypothetical. G

Subscribe to our newsletter

Get the latest industry trends, exclusive insights, and Gcore updates delivered straight to your inbox.