How to Install VirtualBox on Fedora Linux

Oracle VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. VirtualBox is a general-purpose full virtualizer for x86 hardware. Targeted at server, desktop and embedded use, it is now the only professional-quality virtualization solution that is also Open Source Software.

VirtualBox supports a large number of guest operating systems:
Windows 3.x
Windows NT 4.0
Windows 2000
Windows XP
Windows Server 2003
Windows Vista
Windows 7
Windows 8
Windows 8.1
Linux (2.4, 2.6, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11)

This guide shows howto install VirtualBox using VirtualBox own yum repositories.

Change to root User


Install Fedora Repo File

cd /etc/yum.repos.d/


Update latest packages and check your kernel version
Update packages

dnf update

Check that that you are running latest installed kernel version
Output of following commands version numbers should match:

rpm -qa kernel |sort -V |tail -n 1

uname -r

Note: If you got kernel update or run older kernel than newest installed then reboot:


Install following dependency packages

dnf install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms

Install VirtualBox Latest Version 5.2

dnf install VirtualBox-5.2

This command create automatically vboxusers group and VirtualBox user must be member of that group.
This command also build needed kernel modules.

Rebuild kernel modules with following command:

/usr/lib/virtualbox/ setup

Add VirtualBox User(s) to vboxusers Group
Replace user_name with your own user name or some another real user name.

usermod -a -G vboxusers user_name

My username is james

usermod -a -G vboxusers james

Start VirtualBox
Use launcher from menu or simply run:


Thank you for reading.