Ubuntu

How to Install VirtualBox on Ubuntu 20.04 LTS

Install Virtual Box on Ubuntu 20.04

VirtualBox is a cross-platform and open-source virtualization software that is used to run the various guest virtual machines or operating systems simultaneously. Usually, Virtualbox is designed for desktop users as a development and testing environment. Like most of the other operating systems, you can install Virtualbox on a Linux system.

In this article, we will describe the two different methods for the installation of Virtualbox on the Ubuntu 20.04 LTS operating system.

Using the following two different ways you can install Virtualbox in your Ubuntu 20.04 system:

  • Using the standard Ubuntu software repository
  • Using the Oracle repositories

Virtualbox package’s latest version may not be available on the Ubuntu repository. But, from the Oracle repositories, you will always get the latest release of any software.

Prerequisites

Make sure you should have sudo privileges to download and install packages.

Method 1: Install VirtualBox using the Standard Ubuntu Software Repository

You can easily install VirtualBox from the Ubuntu software repository. Using the following commands, you will update the apt software repository and then install the Virtualbox with all extension packs:

$ sudo apt update

$ sudo apt install virtualbox virtualbox-ext-pack

In a while, you will notice that the VirtualBox has been successfully installed on your system. Now, you can start it using the Ubuntu 20.04 system.

Method 2: Install VirtualBox Using the Oracle Repositories

While we are writing this article, the latest available version of VirtualBox is 6.1.x. Therefore, to install the latest version of VirtualBox from the Oracle repositories, you need to open the Ubuntu terminal application by pressing ‘Ctrl+Alt+t’ and implement the following steps:

Step 1: Import the Oracle Public key

Using the following command, you will import the Oracle public keys on your Ubuntu 20.04 system:

$ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
$ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add –

When you execute the above commands, the OK status should display on the terminal to successfully import the public keys and packages from this repository.

Step 2: Add apt repository for VirtualBox

Execute the command which is given below in order to add the Virtualbox apt repository:

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

In the above command, the $(lsb_release -cs) will print the Ubuntu codename or release name for Ubuntu 20.04 version.

Step 3: Installing the VirtualBox

Update all apt packages and install Virtualbox by using the following command on your system:

$ sudo apt update

$ sudo apt install virtualbox-6.1

Step 4: Install Extension pack for Virtualbox

The extension pack provides many different features for guest machines like RDP and virtual USB or device support, image encryption, and more.

Using the following command you can download the extension pack file for VirtualBox:

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

After successful execution of the above command, import all packages by using the following command:

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

Accept the following terms and conditions for the Oracle license agreement which are given as follows:

You will type ‘y’ and press ‘Enter’ to successfully complete the above process.

Step 5: Launch or start Virtualbox

You can launch Virtualbox through the terminal by typing the ‘Virtualbox’ in the terminal or you can launch it using the graphical user environment. Click on the activities and type ‘virtualbox’ in the search bar as follows:

When you start VirtualBox first time on your Ubuntu 20.04 system, the following starting window will appear on your system:

Conclusion

In this tutorial, we have presented two different methods to install VirtualBox on Ubuntu 20.04 system. Now, you can create your first guest Linux machine or Windows environment on your Ubuntu system. If you want to explore more about the working of the Virtualbox then, you can visit the Official documentation of Virtualbox use from this page.

Similar Posts