Gaming industry under DDoS attack. Get DDoS protection now. Start onboarding
  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's the difference between multi-cloud and hybrid cloud?

Multi-cloud and hybrid cloud represent two distinct approaches to distributed computing architecture that build upon the foundation of cloud computing to help organizations improve their IT infrastructure.Multi-cloud environments involve us

What is multi-cloud? Strategy, benefits, and best practices

Multi-cloud is a cloud usage model where an organization utilizes public cloud services from two or more cloud service providers, often combining public, private, and hybrid clouds, as well as different service models, such as Infrastructur

What is cloud migration? Benefits, strategy, and best practices

Cloud migration is the process of transferring digital assets, such as data, applications, and IT resources, from on-premises data centers to cloud platforms, including public, private, hybrid, or multi-cloud environments. Organizations can

What is a private cloud? Benefits, use cases, and implementation

A private cloud is a cloud computing environment dedicated exclusively to a single organization, providing a single-tenant infrastructure that improves security, control, and customization compared to public clouds.Private cloud environment

What is a cloud GPU? Definition, types, and benefits

A cloud GPU is a remotely rented graphics processing unit hosted in a cloud provider's data center, accessible over the internet via APIs or virtual machines. These virtualized resources allow users to access powerful computing capabilities

What is cloud networking: benefits, components, and implementation strategies

Cloud networking is the use and management of network resources, including hardware and software, hosted on public or private cloud infrastructures rather than on-premises equipment. Over 90% of enterprises are expected to adopt cloud netwo

Subscribe to our newsletter

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