In this tutorial, we will show you how to install VirtualBox on AlmaLinux 8. For those of you who didn’t know, VirtualBox is a free and open-source hosted hypervisor for x86 virtualization, developed by Oracle Corporation. VirtualBox can run on Linux, Windows, macOS, and Solaris. It is an alternative to proprietary hypervisor VMware workstation and Kernel Virtual Machine.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the VirtualBox on AlmaLinux 8. You can follow the same instructions for Rocky Linux.
- A server running one of the following operating systems: AlmaLinux 8 or Rocky Linux 8.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
non-root sudo useror access to the
root user. We recommend acting as a
non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.
Install VirtualBox on AlmaLinux 8
Step 1. First, let’s start by ensuring your system is up-to-date.
sudo dnf update sudo dnf install epel-release sudo dnf install kernel-devel kernel-headers gcc make perl elfutils-libelf-devel
Step 2. Installing VirtualBox on AlmaLinux 8.
By default, VirtualBox is not available in the official AlmaLinux repository. Now we add manually Virtualbox repository on AlmaLinux 8:
sudo dnf config-manager --add-repo=https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo
Next, install VirtualBox by using
dnf command below:
sudo dnf update sudo dnf install VirtualBox-6.1
Step 3. Installing VirtualBox Extension Pack.
Oracle offers an extension pack to add additional functionalities to VirtualBox like USB 2.0/3.0, VirtualBox Remote Desktop Protocol (VRDP) support, Disk encryption, and many more. Now we download the extension pack that is available to download from the official page:
cd Downloads sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-*.vbox-extpack
Accept License, when it prompts for the same.
Step 4. Accessing Oracle VirtualBox on AlmaLinux.
Once successfully installed, ow to start your VirtualBox application, go to Activities, click on “show Applications” and then the icon of this open-source virtualization platform, or start VirtualBox by searching the menu or by executing the following command:
Congratulations! You have successfully installed VirtualBox. Thanks for using this tutorial for installing VirtualBox on your AlmaLinux 8 system. For additional help or useful information, we recommend you check the official VirtualBox website.