How to Install and use VirtualBox on Ubuntu 22.04

A VirtualBox is freely available software virtualization package that is used to create different Virtual Machines. As a Linux-user, if you want to run different operating systems, there is no need to utilize different physical resources. Multiple operating systems can be easily executed on a single machine using VirtualBox. It enables the users to switch between various operating systems without rebooting devices which also saves the hardware costs.

This write-up is all about the installation and usage of VirtualBox on Ubuntu 22.04. So, let’s start!

How to install VirtualBox on Ubuntu 22.04

Ubuntu is a more secure Linux-based operating system. We will now use Ubuntu’s default depository to install VirtualBox.

Before starting the installation, we suggest updating and upgrading Ubuntu 22.04 all packages.

Step 1: Update and Upgrade the APT cache Repository

Top 10 Linux Distros

First, open up the terminal by pressing “CTRL+ALT+T”. Then, update and upgrade all packages on Ubuntu 22.04:

$ sudo apt update && sudo apt upgrade

Step 2: Install VirtualBox

For now, we just need to run the following installation command to install VirtualBox on Ubuntu 22.04:

$ sudo apt install virtualbox

After running above mention command, system will ask for taking additional disk space for installation. Enter “y” to continue installation and that’s all:

The above-given output indicates that we have successfully installed VirtualBox on our Ubuntu 22.04 system.

Step 3: Launch the VirtualBox

To launch VirtualBox on Ubuntu 22.04, use the command provided below:

$ virtualbox

After running the above command, VirtualBox application will open up on your Ubuntu 22.04 system:

Step 5: Download and install VirtualBox Extension Package

To use VirtualBox, you need to configure VirtualBox and install its extension package. To get the extension package, we will utilize the following “wget” command:

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

Once extension package is downloaded, install it using the below-mentioned command:

$ sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-6.1.32.vbox-extpack

How to use VirtualBox on Ubuntu 22.04

To use VirtualBox on Ubuntu 22.04, search for it in the “Activities” menu of Ubuntu 22.04 and open it from there:

After opening VirtualBox, click on the “New” button for adding a new Virtual Machine:

Next, enter the “Name” of the operating system you want to set on the created Virtual Machine, specify the “Machine Folder” and the “Version” of operating system:

Select the size of RAM you want to allocate to the Virtual Machine:

Select “Create a virtual hard disk now” option and hit the “Create” button:

Select “VDI (VirtualBox Disk Image)” and press “Next” button:

The opened wizard will ask you to set the type of storage. Select “Dynamically located” option and press the “Next” button:

In the next step, you have to set file location and size of the virtual hard disk according to your preferences. However, we will use the default suggested location and allocate 10GB size to the virtual hard disk and press “Create” button:

Now, click on the “Start” button, provide “ISO” file and using the created Virtual Machine:

That was all essential information related to installation and usage of VirtualBox on Ubuntu 22.04. You can further research as required.

Conclusion

To install VirtualBox on Ubuntu 22.04, you just need to execute the “$ sudo apt install virtualbox” command on the terminal. This command will directly install VirtualBox from Ubuntu 22.04 repository. After that, install VirtualBox extension package and create a new Virtual Machine by using the installed VirtualBox application. In this write-up, we have completely discussed the installation, setup and use of VirtualBox to launch the operating system.