Install VirtualBox in CentOS 8 Linux or Stream

To test different OS such as Windows 10 or other Linux distros as a guest on host CentOS 8 Linux or Stream operating systems, we can use the best open-source Oracle VirtualBox virtualization platform. It supports both 32-bit and 64-bit operating systems. The installation method of Guest operating systems on VirtualBox will be the same on all kind of systems; the only difference we will see is the setting up of this Virtualization platform itself. It is a cross-platform software and available for Windows, Linux, macOS and FreeBSD. The compilation from its source is possible too. The latest version while writing this article was VirtualBox 6.

How to install Oracle VirtualBox on CentOS 8 Linux

Follow the below steps which will be the same for RedHat 8 and Stream OS. Even the Oracle Linux users can follow these steps.

1. Run command terminal and login with root

To install any application on CentOS 8 Linux, we need root or standard user with sudo access without it we can’t install packages. Thus, run the command terminal which available under Activites menu. If you are using Server without GUI then simply log in as root and move to the next step.

To login type:

su

Enter the password:

2. Add VirtualBox repository in CetnOS 8 Linux

By adding below VBox repo, we can tell the system where are the packages of VirtualBox are resides to download. You can use the below command with YUM or DNF, here we are using the dnf.

dnf config-manager --add-repo=https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo
Adding VirtualBox repo in CentOS 9 Linux or stream
command to add repository in CentOS 8

3. Import Oracle signing keys for Virtualbox

To check the integrity of the packages that we will download to install VirtualBox and also they are from the right source, we import Oracle signed keys for the VirtualBox.

rpm --import https://www.virtualbox.org/download/oracle_vbox.asc
import keys for virtualbox instalaltion

4. Search for available packages

Now first let’s search the available packages on the Oracle Virtualbox repository to download:

dnf search virtualbox

When it asks you to confirm the Fingerprint, press Y and accept that.

Output for the above command.

Oracle Linux / RHEL / CentOS-8 / x86_64 - Virtu  62  B/s | 181  B     00:02
Oracle Linux / RHEL / CentOS-8 / x86_64 - Virtu 465  B/s | 1.7 kB     00:03
Importing GPG key 0x98AB5139:
Userid     : "Oracle Corporation (VirtualBox archive signing key)
<info@virtualbox.org>"
Fingerprint: 7B0F AB3A 13B9 0743 5925 D9C9 5442 2A4B 98AB 5139
From       : https://www.virtualbox.org/download/oracle_vbox.asc
Is this ok [y/N]: y
Oracle Linux / RHEL / CentOS-8 / x86_64 - Virtu 2.4 kB/s | 8.3 kB     00:03
Last metadata expiration check: 0:00:01 ago on Sat 28 Sep 2019 03:19:08 AM EDT.
====================== Name & Summary Matched: virtualbox ======================
VirtualBox-6.0.x86_64 : Oracle VM VirtualBox
Search for VirtualBox packages

5. Download and install VirtualBox 6.0

Finally, in the above command, we know the available latest version to install for CentOS 8 is 6.0, thus run YUM or DNF with install command for VirtualBox.

dnf install VirtualBox-6.0

or

yum install VirtualBox-6.0

Note: Remember the above command its case sensitive.

When it asks for your permission to download the packages give that.

Dnf virtualbox 6.0 install redhat 8

6. Run VirtualBox on CentOS 8 Linux or RHEL 8

If you want to use run this installed Oracle virtualization platform from command terminal, simply type:

virtualbox

Those are using the Graphical user interface, they can directly go to the Activities menu, given on the top left side and then click on the VirtualBox icon.

Start-Oracle-Virtual-Box

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.