Virtualbox is an open-source virtualization platform available for all popular operating systems- Windows, Linux, FreeBSD, and macOS. Here we learn how to install VirtualBox on free, RedHat-based AlmaLinux 8.
AlmaLinux came into existence after the announcement of Redhat, that they are going to stop publishing a long-term supported version of CentOS 8 after that few developers took the initiative to provide an alternative Server Linux equal to RedHat or CentOS. AlmaLinux and RockyLinux are a few of them, however, RockyLinux is still in a development phase, while the beta version of AlmaLinux is available to try while writing this article.
What do we learn here:
- How to add a Virtual repository on AlmaLinux
- Command to install the latest version of VirtualBox
Steps to install VirtualBox app on AlmaLinux 8
The steps given here are also applicable for CentOS 8, RHEL 8, and other similar Linux distros.
1. Open Command Terminal
First, go to the Applications and open your system’s Command terminal application. To install it on some remote server you can access it via SSH.
2. Add Virtualbox repository in AlmaLinux 8
The packages to install VirtualBox on AlmaLinux are not available in the official repository of the OS. Thus, in such a scenario, we have to add it manually using the command line. Simply copy-paste or type the below command and hit the Enter key.
sudo dnf config-manager --add-repo=https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo
After that run the system update command:
sudo dnf update
Output for the above commands:
[root@localhost ~]# sudo dnf config-manager --add-repo=https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo Adding repo from: https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo [root@localhost ~]# sudo dnf update Oracle Linux / RHEL / CentOS-8 / x86_64 - VirtualBox 968 B/s | 181 B 00:00 Oracle Linux / RHEL / CentOS-8 / x86_64 - VirtualBox 956 B/s | 1.7 kB 00:01 Importing GPG key 0x98AB5139: Userid : "Oracle Corporation (VirtualBox archive signing key) <[email protected]>" 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 - VirtualBox 474 kB/s | 148 kB 00:00 Dependencies resolved. ===================================================================================================== Package Architecture Version Repository Size ===================================================================================================== Upgrading: bind-export-libs x86_64 32:9.11.20-5.el8_3.1 baseos 1.1 M bind-libs x86_64 32:9.11.20-5.el8_3.1 appstream 171 k bind-libs-lite x86_64 32:9.11.20-5.el8_3.1 appstream 1.2 M bind-license noarch 32:9.11.20-5.el8_3.1 appstream 100 k bind-utils x86_64 32:9.11.20-5.el8_3.1 appstream 444 k microcode_ctl x86_64 4:20200609-2.20210216.1.el8_3 baseos 4.6 M python3-bind noarch 32:9.11.20-5.el8_3.1 appstream 148 k Transaction Summary ===================================================================================================== Upgrade 7 Packages Total download size: 7.7 M Is this ok [y/N]:
3. Command to Install VirtualBox
While writing this article the latest version of the VirtualBox available to install for AlmaLinux 8 was 6.x, thus let’s first see all the available versions of this virtualization platform available to download, for that type:
dnf search virtualbox
You can see in the below-given screenshot while writing this article, we got three VirtualBox version choices to install i.e 5.2, 6.0, and 6.1. Here we will go for the latest one.
sudo dnf install VirtualBox-6.1
Similarly, you can install any previous version, if required.
4. Installing VirtualBox Extension Pack
To have the support for various VirtualBox functions such as using USB 2.0 and USB 3.0 devices, VirtualBox RDP, disk encryption, NVMe, and PXE boot for Intel cards, we need to add its Extension pack that is available to download from the official website.
Therefore, go to the website of VirtualBox.
- Scroll down and find the Extention pack.
- Click on All Supported Platforms to download it.
- Now, go to the command terminal.
- As whatever we get from the browser go to the Downloads directory, thus switch to that first.
- Finally, use the VBoxManage tool for the installation of the Extension Pack.
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-*.vbox-extpack
- Accept License, when it prompts for the same.
5. Run Oracle VirtualBox
Everything is done, now to start your VirtualBox application, go to Activities, click on “show Applications” and then the icon of this open-source virtualization platform. Alternatively, we can also start it using the command terminal, for that you simply need to type:
So, these were the few simple commands to add a repository of VirtualBox for the installation of it on Linux, if you want to test AlmaLinux then here is the tutorial- How to install AlmaLinux 8 on VirtualBox