Learn how to install Virtualbox 7.1.4 version on Ubuntu 24.04, 22.04,20.04 ,16.04, 14.04 LTS Desktop. We are using VirtualBox for creating Virtual Machines(VM). Our main goal here is to use Virtual Machine(VM) for our DevOps practices. It is a good idea to use VirtualBox or other virtualisation for your DevOps related practices in test VM.
VirtualBox is OpenSource and free virtualization software. So surely it is economical too.
Install Virtual Box on Ubuntu 24.04 LTS Desktop System
Update the apt source file
This command will update the /etc/apt/sources.list file. You can find the updated last line in the file.
echo "deb https://download.virtualbox.org/virtualbox/debian `lsb_release -c|awk '{print $2}'` contrib"|sudo tee -a /etc/apt/sources.list
Download and register the keys in 24.04, 22.04 LTS Desktop
Follow this step if your Ubuntu Operating System is 24.04 or 22.04 LTS version.
wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --dearmor --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg
Download and register the keys in 20.04 ,16.04, 14.04 LTS Desktop
Follow this step if your Ubuntu Operating System version is 20.04 LTS or lower.
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 -
Install Virtual Box. Replace with latest version number
sudo apt-get update
sudo apt-get install virtualbox-7.1
sudo systemctl daemon-reload
The above 3 steps will install the VirtualBox and you are ready to use it. We will encourage you to always read the official documentation.
Open the Virtualbox, by clicking on ‘Dash Home’ and in search type Virtualbox, click on the icon it will open the VirtualBox. Now you can start using it – create and manage the Virtual Machines in there.
To optimize the performance of Guest Operating System, you should install VirtualBox Guest Additions. After installing VirtualBox Guest Additions, you can also create videos of Guest Operating System.
Uninstall VirtualBox
To uninstall the VirtualBox, run the following command
sudo apt-get install virtualbox-7.1