Edited 5 days ago by ExtremeHow Editorial Team
VirtualBoxLinuxInstallationSetupBeginnerSoftwareOperating SystemWalkthrough
This content is available in 7 different language
VirtualBox is a powerful free virtualization software that allows you to run multiple operating systems on a single machine. It is useful for developers, testers, and anyone who needs to run multiple operating systems without needing separate hardware for each. In this guide, we will explain how to install VirtualBox on a Linux system. We will cover common Linux distributions including Ubuntu, Fedora, and CentOS. By the end of this walkthrough, you will be able to confidently install and run VirtualBox on your Linux machine.
VirtualBox is an open-source virtualization platform that allows users to create and manage virtual machines. With VirtualBox, you can run different operating systems on your single host machine, making it easy to work with different software environments. This makes it a very flexible tool for developers, testers, and IT professionals.
VirtualBox supports a wide range of guest operating systems, including Windows, macOS, Linux, Solaris, and more. It also has robust features such as seamless mode, shared folders, support for USB devices, and snapshots, which allow you to save the state of your virtual machine and return to it later when needed.
Before we get into the installation, there are a few pre-requisites that you need to ensure:
The first step to installing any new software on your Linux machine is to update your system's package list and upgrade existing packages. This ensures that all software dependencies are up-to-date, which helps in the smooth installation of new programs.
To do this, run the following command:
sudo apt update && sudo apt upgrade
For non-Ubuntu systems, you can use similar commands like `sudo dnf update` or `sudo yum update`.
VirtualBox provides its own repository for all supported distributions. Adding this repository to your package manager makes installation and upgrades easier.
Open your terminal and add the repository:
sudo sh -c 'echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" > /etc/apt/sources.list.d/virtualbox.list'
Then download and add Oracle's public key:
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
Add VirtualBox Repository:
sudo dnf install -y https://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
You will first need to install the EPEL repository and the RPM Fusion repository to cover the wide range of packages that VirtualBox depends on.
sudo yum install epel-release
sudo yum install https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
Then add the VirtualBox repository:
sudo yum-config-manager --add-repo=https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo
After installing the repository, proceed to install VirtualBox using the package manager specific to your Linux distribution.
Now, update your package list and install VirtualBox:
sudo apt update
sudo apt install virtualbox-6.1
For Fedora, you will need to install the latest “Development Tools” and required packages before installing VirtualBox:
sudo dnf install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms
sudo dnf install VirtualBox-6.1
For CentOS, use the following command:
sudo yum install VirtualBox-6.1
The Oracle VM VirtualBox Extension Pack provides additional functionalities such as support for USB 2.0/3.0 devices, VirtualBox RDP, disk encryption, and more. This is a valuable addition, especially if you plan to maximize the functionalities of your virtual machines.
First, download the extension pack using the wget command:
wget https://download.virtualbox.org/virtualbox/6.1.28/Oracle_VM_VirtualBox_Extension_Pack-6.1.28.vbox-extpack
Then, install it with the VBoxManage tool that comes with VirtualBox:
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-6.1.28.vbox-extpack
Follow the on-screen prompts to accept the license terms and confirm the installation.
After VirtualBox is installed, you are now ready to start creating and using virtual machines! Open VirtualBox from your Applications menu. You should see the Oracle VM VirtualBox Manager interface.
To create a new virtual machine, click the "New" button and follow the steps to set up a virtual environment. You'll need to choose which operating system you want to install, allocate system resources (such as CPU and memory) and create a virtual disk.
If VirtualBox does not start, it may be due to the lack of necessary kernel modules. You can try loading them with the following command:
sudo /sbin/vboxconfig
If you have problems related to kernel updates, make sure to rebuild the VirtualBox kernel modules:
sudo /sbin/vboxconfig
Additionally, consult the VirtualBox manual and online forums for further troubleshooting steps if necessary.
Installing VirtualBox on a Linux machine may seem complicated as it requires adding repositories and managing dependencies, but it becomes simple by following these steps. With VirtualBox, you can explore different operating systems, test software in different environments, and gain extensive flexibility on your Linux host machine. Enjoy the unlimited potential that VirtualBox provides in your computing environment!
If you find anything wrong with the article content, you can