How To Install virtualbox-source on Ubuntu
Posted on April 1, 2023  (Last modified on May 20, 2023 )
2 minutes • 411 words
Introduction
In this tutorial we learn how to install virtualbox-source
on Ubuntu.
What is virtualbox-source
virtualbox-source is:
VirtualBox is a free x86 virtualization solution allowing a wide range of x86 operating systems such as Windows, DOS, BSD or Linux to run on a Linux system.
This package provides the source code for the virtualbox kernel module. The virtualbox package is also required in order to make use of these modules. Kernel sources or headers are required to compile this module.
The source is placed under /usr/src, and after decompression it can be built to produce a virtualbox-modules-KVERS providing “virtualbox-modules” package.
There are three methods to install virtualbox-source
on Ubuntu. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install virtualbox-source Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install virtualbox-source
using apt-get
by running the following command:
sudo apt-get -y install virtualbox-source
Install virtualbox-source Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install virtualbox-source
using apt
by running the following command:
sudo apt -y install virtualbox-source
Install virtualbox-source Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install virtualbox-source
using aptitude
by running the following command:
sudo aptitude -y install virtualbox-source
How To Uninstall virtualbox-source on Ubuntu
To uninstall only the virtualbox-source
package we can use the following command:
sudo apt-get remove virtualbox-source
Uninstall virtualbox-source And Its Dependencies
To uninstall virtualbox-source
and its dependencies that are no longer needed by Ubuntu, we can use the command below:
sudo apt-get -y autoremove virtualbox-source
Remove virtualbox-source Configurations and Data
To remove virtualbox-source
configuration and data from Ubuntu we can use the following command:
sudo apt-get -y purge virtualbox-source
Remove virtualbox-source configuration, data, and all of its dependencies
We can use the following command to remove virtualbox-source
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge virtualbox-source
Dependencies
virtualbox-source have the following dependencies:
References
Summary
In this tutorial we learn how to install virtualbox-source
package on Ubuntu using different package management tools: apt, apt-get and aptitude.