The objective of this tutorial is to install VirtualBox on Fedora Linux. VirtualBox is a free and open source hosted hypervisor for x86 virtualization developed and maintained by the Oracle Corporation.
VirtualBox is a great way to install a guest operating system on your computer, if you either want to try a different operating system or just maintain a separate environment from your host system. You will learn how to install VirtualBox via both command line in this tutorial.
In this tutorial you will learn:
- How to install dependencies for VirtualBox
- How to Install VirtualBox from command line
|Category||Requirements, Conventions or Software Version Used|
|Other||Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
Install VirtualBox on Fedora step by step instructions
- Get started by opening a command line terminal and using the following command with root permissions to install all of the prerequisite packages for VirtualBox.
$ sudo dnf -y install @development-tools $ sudo dnf -y install kernel-headers kernel-devel dkms elfutils-libelf-devel qt5-qtx11extras
- Next, we will add the VirtualBox RPM repository.
$ cat <<EOF | sudo tee /etc/yum.repos.d/virtualbox.repo [virtualbox] name=Fedora $releasever - $basearch - VirtualBox baseurl=http://download.virtualbox.org/virtualbox/rpm/fedora/36/\$basearch enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc EOF
- Next, import the VirtualBox GPG key.
$ sudo dnf search virtualbox
yon your keyboard to confirm installation.
- Finally, install VirtualBox.
$ sudo dnf install VirtualBox-7.0
- That’s all there is to it. You can now open VirtualBox from the app launch menu or just execute the following command in terminal to open the program.
After installing a guest operating system, you can now install VirtualBox Guest Additions on Fedora in order to unlock some additional features for your virtual machine such as a shared clipboard with the host system, drag and drop file transfer, and automatic window resizing.
In this tutorial, we saw how to install VirtualBox on Fedora Linux. Now you can use an ISO file to install a guest operating system as a virtual machine. This is a great way to have an environment separate from your host system in order to test software or use a completely different type of operating system such as BSD, Windows, or MacOS.