How to Install VirtualBox in Linux?
Last Updated :
11 Oct, 2024
Virtual Machine abstracts the hardware of our personal computers such as CPU, disk drives, memory, NIC (Network Interface Card), etc., into many different execution environments as per our requirements, hence giving us a feeling that each execution environment is a single computer.
For example, VirtualBox. We can create a virtual machine for several reasons, all of which are fundamentally related to the ability to share the same basic hardware yet also support different execution environments, i.e., different operating systems simultaneously.
Methods to Install Virtual Box on our Debian-based Linux system
Here are three ways to download VirtualBox on a Debian-based system like Ubuntu. Each method offers different advantages, such as convenience or the ability to get the latest version of the software.
Method 1: Install VirtualBox from Ubuntu Repository
Open the terminal and run this command.
sudo apt install VirtualBox
.webp)
sudo apt install VirtualBox
Verify Installation
We use the `dpkg` command which is used to manage installed packages on Debain-based system like Ubuntu.
dpkg -l | grep virtualbox
.webp)
dpkg -l | grep virtualbox
Method 2: Install VirtualBox using GUI (Graphical User Interface)
Downloading and Installing VirtualBox. To download VirtualBox, go to the official site virtualbox.org and download the latest version for Linux.Â
For example: We want to install VirtualBox for Ubuntu.
Step 1: Double Click on this
.webp)
select Ubuntu 22.04
Step 2: Follow the numbering.Â
First Right click and select ‘open with other application’, then follow the numbering.
.webp)
Steps for installing Virtualbox
Step 3: Click on Install
.webp)
Click on Install
Step 4: Search Virtualbox and Double click on application.
.webp)
Virtualbox application
VirtualBox application Opened.
.webp)
VirtualBox in Ubuntu
Method 3: Installing VirtualBox using Oracle’s repository
Step 1: Run this command in your terminal (adding key for the repository)
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo gpg --dearmor -o /usr/share/keyrings/oracle-virtualbox-2016.gpg
Step 2: Run this command in your terminal (adding Oracal VirtualBox repository in the repository list)
sudo add-apt-repository "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib"
Step 3: Update the package list.
sudo apt-get update
Step 4: Command for installation of virtualbox
sudo apt-get install virtualbox
How to Install VirtualBox in Linux – FAQs
What is Virtual machine, and why would I want to use one?
A virtual machine simulates a physical computer, allowing multiple operating systems to run on a single machine. Common uses include:
- Testing software in a controlled environment.
- Running specific OS versions.
- Executing applications incompatible with the host OS.
- Creating a sandbox for testing malicious software.
For instance, you can run a Windows environment on a Linux system using VirtualBox
What is the difference between installing VirtualBox from the Ubuntu repository and installing it from Oracle’s repository?
The main difference is the VERSION of VirtualBox. When we download it from Ubuntu repository there are chances that the version of VirtualBox would not be upto date. And when we download it from Oracle repository (from official website) it is always of newer version, upto date and all bugs fixed.
How do I create a virtual machine in VirtualBox, and what are some common configurations I might use?
To create a virtual machine in VirtualBox:
- Open VirtualBox and click “New.”
- Enter a name for the VM.
- Select the operating system and version.
- Allocate memory, create a virtual hard disk, and adjust settings as needed.
Common configurations include increasing memory and disk size.