Screenshot featuring a chameleon installing Virtual Box on a CentOS computer

Install VirtualBox on CentOS / RHEL / Scientific Linux

Screenshot featuring a chameleon installing Virtual Box on a CentOS computer

This how-to is about installing VirtualBox on CentOS. Provided instructions should also work on Scientific Linux and Red Hat Enterprise Linux (RHEL).

It is possible to install VirtualBox from rpm packages, which can be downloaded on the VirtualBox Linux downloads page. However, a yum-style repository is also provided – we’ll use the latter.

DKMS, RPMForge, sudo

Before installing VirtualBox, one should install DKMS, as VirtualBox will build its own kernel module. If you didn’t install RPMForge, please follow this tutorial first. This howto also supposes that you have added yourself to the sudoers list (of course, you may as well use su or log in as root).

DKMS has some important dependencies like gcc and kernel-devel. Use the following command line to install DKMS and its dependancies:
sudo yum install dkms

Install Virtualbox

Once DKMS an its dependencies are installed, we can download and add the repo file to /etc/yum.repos.d/:
sudo wget -P /etc/yum.repos.d

Finally, VirtualBox is ready to install:
sudo yum install VirtualBox-5.0

Add yourself to the vboxusers group using the “Users and Groups” application or the command line:
sudo usermod -a -G vboxusers your_user_name

It is possible to use VirtualBox without adding yourself (as a user) to the vboxusers group. If you don’t, some functions may be unavailable, as using USB devices on the guest system.

Run Virtualbox

VirtualBox should now be available in the menu or running VirtualBox. Don’t forget to install the non-free Extension Pack via the File→Preferences→Extensions menu.

Screenshot of VirtualBox running Windows on CentOS
Because running Windows 7, 8.1 or 10 is not enough…

Miscellaneous: USB, Network drives

If you get problems using USB, take a look at the CentOS Wiki. Make sure your user belongs to the usergroup vboxusers.

To share any folder as a network drive, just enter the following command at the MSDOS prompt:
net use x: \\vboxsvr\your_shared_folder

By Johannes Eva, April 2012 – August 2016
This article has been linked on and some more…

Picture copyright: chameleon with a red hat, detail from this VirtualBox original artwork, unknown license.

  • All
  • Archive
  • Image
  • Linux
  • Linux Server
  • Smartwatches
  • Updated
  • WordPress
LibreOffice installation on Linux

How to install LibreOffice 7.4 on Linux Mint, Ubuntu, MX Linux, Debian…

Last updated on September 27, 2022 This article describes how to install LibreOffice 7.4 on Debian/Ubuntu-based Linux distributions, such as Linux Mint, MX Linux, Ubuntu …

Read More →

AVIF browser test page: AVIF support in Chrome, Firefox, Edge…

Logo: Alliance for Open Media. License: BSD Last updated on September 29, 2022 Is your browser capable of displaying AVIF images? Here comes a fast answer …

Read More →
How to remove TLSv1.0 and 1.1 and enable TLS 1.3 in Nginx on Ubuntu Server
Linux ServerUpdated

How to remove TLSv1.0 / 1.1 and enable TLS 1.3 in Nginx …

Photo: License: CC BY-SA 4.0 … on Ubuntu 18.04, 20.04 or 22.04 Last updated on September 29, 2022In January 2020, SSL Labs started to …

Read More →
How to install Mozilla Firefox on Linux (Ubuntu, Linux Mint or any Linux distribution)

How to Install Firefox 105 on Linux Mint, Ubuntu, Debian or any other Linux distribution

Photo: janeb13 / Pixabay, Pixabay License Last updated on September 27, 2022 This how-to explains how to install Firefox on Linux, with or without replacing an existing …

Read More →
Libre Software

Older archived articles

Ubuntu & NVIDIA: external monitor, rotation, … (.pdf) January 2011: This how-to describes how to configure external monitors with the “NVIDIA X Server Settings” utility …

Read More →
Sudo on CenOS, Red Hat Enterprise Linux and Scientific Linux

Sudo on CentOS / Scientific Linux / RHEL

This short howto is about setting up sudo on Red Hat Entreprise Linux and its derivates CentOS and Scientific Linux. It also gives a quick …

Read More →
Libre Software

How to edit image metadata on Linux

Photo: License: CC BY-SA 4.0 Last updated on September 27, 2022 Image metadata is a complex field with multiple standards, the most important among …

Read More →
Which Samsung Galaxy Watch should I choose?

Choosing the Right Samsung Galaxy Watch4: Size, Weight and Thickness

Photo: License: CC BY-SA 4.0 Galaxy Watch 40/44mm or 42/46mm “classic”? Last updated on October 1, 2022 How thin is the Galaxy Watch4? Thickness …

Read More →
Libre Software

Multimedia, codecs, MP3 & DVD support on CentOS, Scientific Linux or RHEL

This tutorial details how to install full multimedia support, media codecs, MP3 & DVD support on Red Hat Enterprise Linux (RHEL) and its derivatives CentOS, …

Read More →
LEMP Tutorial on Ubuntu (How to install Linux, Nginx, PHP, MySQL)
Linux Server

How to install a LEMP stack on Ubuntu Server 18.04, 20.04 or 22.04

Introduction This guide shows how to get a full LEMP software stack installed on Ubuntu Server 18.04 “Bionic Beaver”, 20.04 “Focal Fossa” or 22.04 “Jammy …

Read More →

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.