Virtualbox installation on Fedora Linux

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
Virtualbox installation on Fedora Linux
Virtualbox installation on Fedora Linux
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Fedora Linux
Software Oracle VirtualBox
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

Install VirtualBox on Fedora step by step instructions



Twitter icon Follow LinuxConfig.org on Twitter for the latest tips and tricks about Linux!

  1. 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
    
  2. 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
    
  3. Next, import the VirtualBox GPG key.
    $ sudo dnf search virtualbox
    

    Hit y on your keyboard to confirm installation.

  4. Finally, install VirtualBox.
    $ sudo dnf install VirtualBox-7.0
    
  5. 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.
    $ virtualbox
    

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.

Closing Thoughts




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.



Comments and Discussions
Linux Forum