Install VirtualBox on Ubuntu

Learn how to install Virtualbox on Ubuntu 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 Desktop System

  1. Update the apt source file
  2. 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
    
  3. Download and register the keys in 22.04 LTS Desktop
  4. wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --dearmor --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg
    
  5. Download and register the keys in 20.04 ,16.04, 14.04 LTS Desktop
  6. 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 -
    
  7. Install Virtual Box. Replace with latest version number
  8. sudo apt-get update
    sudo apt-get install virtualbox-7.0
    

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.

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.

The official documentation is very useful and here is the referral url : Download Virtual Box