Mastering the Installation of VirtualBox on Ubuntu: A Comprehensive Guide 2024

TasnuvaRahman
4 min readApr 30, 2024

VirtualBox is a popular virtualization software that allows running multiple operating systems (virtual machines) on a single computer. Installing VirtualBox on Ubuntu, a Linux distribution, offers several benefits:

  1. Native integration with the Linux environment.
  2. Compatibility with the open-source ecosystem of both Ubuntu and VirtualBox.
  3. Lightweight and efficient performance, ideal for systems with limited resources.
  4. Enhanced security inherited from Ubuntu’s robust security features.
  5. Support for a wide range of guest operating systems, including Windows and other Linux distributions.
  6. Access to large user communities for both Ubuntu and VirtualBox for support and resources.

By combining VirtualBox with Ubuntu, users gain a powerful virtualization solution that seamlessly integrates with their host operating system, providing a secure and versatile environment for testing, development, and running multiple software configurations.

System Requirement

For the operating system requirements to run VirtualBox on Ubuntu, you need:

  • Ubuntu version 18.04 LTS or a newer release, including both the desktop and server editions.
  • The Linux kernel version should be 3.8 or higher. Ubuntu 18.04 LTS comes pre-installed with kernel 4.15, which meets this requirement.

Installing VirtualBox

1. Through Ubuntu Software Center:

  • Launch the Ubuntu Software Center from the Applications menu or by searching for it.
  • In the search bar, type “VirtualBox” and select the official package when it appears.
  • Click the “Install” button, and follow any prompts to complete the installation process.

2. Via Command Line Interface(Recommended way): For those comfortable with using the terminal and the apt package manager, VirtualBox can be installed through the following steps:

  • Follow this Link . Scroll down below to Debian-based Linux distribution section.
  • Enter the given commands one by one
sudo nano /etc/apt/sources.list

It will open up a file in your terminal now copy this command below and paste in on the top of this file . Replace <mydist> with your linux distro(jammy ,eoan,bionic,xenial etc) .Then save and close the file.

deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian <mydist> contrib
  • Now run this Command on terminal.It will combine downloading and registering.
wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg --dearmor
  • Now run this two commands.Replace the version with the desired version you want to install (6.0,7.0 etc).The latest one is virtualbox-7.0
sudo apt-get update
sudo apt-get install virtualbox-version
  • Now let’s install Oracle VM VirtualBox Extension Pack. As extension Pack is an optional add-on that enhances VirtualBox with several useful features, including:
  1. USB device support and improved USB controller compatibility.
  2. Remote Desktop Protocol (RDP) for remote access to virtual machines.
  3. Disk encryption for securing virtual disk images.
  4. Improved virtual machine management interface.
  5. Host webcam support within virtual machines.
  6. Advanced virtual networking capabilities.

While not strictly required, installing the Extension Pack can provide additional functionality, better performance, and enhanced compatibility with various hardware and software components within VirtualBox virtual machines.
Follow this Link . Scroll down below to Oracle VM VirtualBox Extension Pack section.Click on the All suuported platforms link.It will download the extention pack.

Downloaded extension pack

Double click on the Downloaded pack and click on the install button.

Congratulations! Just like that, you’ve successfully installed VirtualBox on your Ubuntu system. Now, you’re ready to dive into the world of virtualization and unleash the power of running multiple operating systems simultaneously on your Ubuntu machine.

But don’t stop here! VirtualBox offers a plethora of features and possibilities beyond just installation. Experiment with creating virtual machines, testing different operating systems, setting up networking configurations, and exploring snapshots to save and restore virtual machine states.

Whether you’re a developer testing software across multiple environments, a system administrator managing server deployments, or simply an enthusiast exploring new technologies, VirtualBox on Ubuntu opens up a world of opportunities.

So, go ahead, explore, innovate, and make the most out of your virtualization journey with VirtualBox on Ubuntu. Happy virtualizing!

--

--