Best Linux Distro

How To Install VirtualBox In Ubuntu/Linux? – Complete Guide

VirtualBox is a powerful and popular virtualization software that allows users to run multiple operating systems on a single computer. This is particularly useful for software developers, testers, or anyone who needs to work with different operating systems without having to purchase and set up multiple physical machines.

If you’re a new Linux user, you may be wondering how to install VirtualBox on your Ubuntu/Linux system.

Fortunately, the installation process is simply straightforward and can be done using either the command line or the graphical user interface. In this article, I’ll walk you through the steps to install VirtualBox on Ubuntu/Linux.

Checking Your System Requirements

Before installing VirtualBox on Ubuntu/Linux, it’s important to make sure that your system meets the minimum requirements. The exact requirements may vary depending on the version of VirtualBox you’re installing, but in general, you’ll need at least:

  • A 64-bit processor with hardware virtualization support
  • 2GB of RAM (4GB or more is recommended)
  • 20 GB or more free disk space

To check if your system meets these requirements, you can use the “lscpu” command in the terminal to see if your processor supports virtualization.

lscpu | grep Virtualization

Example output:

Virtualization:                  VT-x

You can also check your system’s RAM using the “free -h” command.

free -h

Example output:

               total        used        free      shared  buff/cache   available
Mem:            15Gi       5.0Gi       165Mi       735Mi        10Gi       9.3Gi
Swap:          2.0Gi        35Mi       2.0Gi

And to check available disk space, use the “df -h” command.

df -h

Example output:

Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme0n1p2   98G   23G   71G  25% /
/dev/nvme0n1p3  359G  246G   96G  73% /home
/dev/nvme0n1p1  487M   32M  455M   7% /boot/efi

Keep in mind that if you’re planning to run multiple virtual machines simultaneously or run particularly resource-intensive applications, you may need more powerful hardware.

Download VirtualBox for Ubuntu/Linux

Once you’ve confirmed that your system meets the minimum requirements, you can download the latest version of VirtualBox for your Ubuntu/Linux distribution. You can download the latest Deb file from the VirtualBox website.

Download VirtualBox

Visit the download page from the above link and choose the appropriate package for your distribution (e.g., Ubuntu 22.04) and download the .deb file. You can check the tutorial: How To Install A DEB File In Ubuntu? for a better understanding of the following section.

Install VirtualBox Using the Terminal

After downloading the DEB file from the VirtualBox website, you can install it using the terminal. I have downloaded the file in the Downloads directory. Now open up a terminal window by pressing Ctrl+Alt+T and navigate to the Downloads folder using this command.

cd Downloads

Now use this command to install the DEB file using the APT Package Manager.

sudo apt install <filename>.deb

Replace <filename> with the actual name of the file.

For example:

sudo apt install virtualbox-7.0_7.0.6-155176~Ubuntu~jammy_amd64.deb

This will install VirtualBox on your system.

Alternatively, you can use the package manager to install VirtualBox. On Ubuntu, you can use the “apt” command to install VirtualBox from the Ubuntu repositories:

sudo apt update 
sudo apt install virtualbox

This will automatically download and install VirtualBox for your distribution. But you may not get the latest version of VirtualBox.

Install VirtualBox Using the Graphical User Interface (GUI)

If you prefer a graphical interface, you can also install VirtualBox using the Ubuntu Software Center. Simply search for “VirtualBox” in the Software Center and click “Install“. This will automatically download and install VirtualBox on your system.

To install VirtualBox from the Ubuntu Software Center. Open the Software Center and search for “VirtualBox“. Click on “VirtualBox” and open its page.

Install VirtualBox Using Ubuntu Software Center - Step 1

Click the “Install” button, and it will ask you to enter your password.

Install VirtualBox Using Ubuntu Software Center - Step 2

Enter your password to authenticate the process.

Install VirtualBox Using Ubuntu Software Center - Step 3

Wait for the installation to be completed.

After installing VirtualBox, you can click on Show Applications from the Dock and search for VirtualBox to run it.

Search For VirtualBox

How To Install VirtualBox Extension Pack?

VirtualBox Extension Pack is a set of additional functionalities that extend the functionality of the VirtualBox virtualization software. It provides additional features that are not available in the VirtualBox base package, such as support for USB 2.0/3.0 devices, VirtualBox Remote Desktop Protocol (VRDP), and the ability to encrypt disk images.

The Extension Pack can be installed on top of the VirtualBox base package, and it is available for download from the VirtualBox website.

Download VirtualBox Ext Pack

Download VirtualBox Extension Pack

It is important to note that the VirtualBox Extension Pack must match the version of the VirtualBox base package that is installed on your system.

The VirtualBox Extension Pack is free to download and use for personal or evaluation purposes. However, if you are using VirtualBox in a commercial environment, you may need to purchase a commercial license.

To install the VirtualBox Extension Pack, follow the steps below.

Step 1. Open VirtualBox and click on Tools > Extensions.

Install VirtualBox Extension Pack - Step 1

Step 2. Click on the Install button.

Install VirtualBox Extension Pack - Step 2

Step 3. Select the VirtualBox Extension Pack that you have downloaded from the official VirtualBox website.

Install VirtualBox Extension Pack - Step 3

Step 4. Click Install and proceed.

Install VirtualBox Extension Pack - Step 4

Step 5. Scroll down to the end and accept the license.

Install VirtualBox Extension Pack - Step 5

Step 6. Enter your password and authenticate.

Install VirtualBox Extension Pack - Step 6

VirtualBox Extension Pack is successfully installed.

VirtualBox Extension Pack Installed

Alternatively, you can download and install VirtualBox Extension Pack from the Ubuntu repositories. This option is appropriate only if you have installed the VirtualBox base package from the Ubuntu repositories.

sudo apt install virtualbox-ext-pack

This will automatically download and install VirtualBox Extension Pack for your VirtualBox base package.

Don’t use it if you have installed the DEB file from the official website.

Configuring VirtualBox After Installation

After installing VirtualBox, you may want to configure it to suit your needs. This can include setting up virtual networks, changing the default storage location for virtual machines, or adjusting performance settings.

To access VirtualBox’s settings, open the VirtualBox Manager and click “File” > “Preferences“. From there, you can explore the various settings categories and make changes as needed.

Troubleshooting Common Installation Issues For VirtualBox

If you run into issues during the installation process, there are a few common troubleshooting steps you can try. For example, you may need to enable virtualization in your system’s BIOS or UEFI settings. You can also try updating your system’s packages and dependencies or checking for any conflicting software.

If you’re still having issues, you can refer to the VirtualBox documentation or seek help from the Ubuntu/Linux community.

How To Uninstall VirtualBox from Ubuntu/Linux?

If you need to uninstall VirtualBox from your system, you can do so using the terminal. Simply run the following command to uninstall VirtualBox:

sudo apt remove virtualbox

This will remove VirtualBox and any associated packages from your system.

Conclusion

VirtualBox is a powerful and popular virtualization software that allows you to run multiple operating systems on a single computer. If you’re a new Linux user, don’t worry, the installation process is simple. Just make sure that your system meets the minimum requirements before downloading and installing VirtualBox.

Also, don’t forget to install the VirtualBox Extension Pack to extend the functionality of the software. Keep in mind that if you’re planning to run multiple virtual machines simultaneously or run particularly resource-intensive applications, you may need more powerful hardware.

Leave a Reply

Your email address will not be published. Required fields are marked *

nineteen − 4 =