Open In App

How to Install VirtualBox in Linux?

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Share
Report issue
Report

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 can also support different execution environments, i.e., different operating systems simultaneously.

There are Three ways to Install Virtual Box on our Debain-based Linux system.

1) Install VirtualBox from Ubuntu Repository

Open the terminal and run this command.

sudo apt install VirtualBox
sudo apt install VirtualBox

sudo apt install VirtualBox

To check if it is installed. 

We use the `dpkg` command which is used to manage installed packages on Debain-based system like Ubuntu.

dpkg -l | grep virtualbox
dpkg -l | grep virtualbox

dpkg -l | grep virtualbox

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

select Ubuntu 22.04

select Ubuntu 22.04

Step 2: Follow the numbering. 

First Right click and select ‘open with other application’, then follow the numbering.

Steps for installing Virtualbox

Steps for installing Virtualbox

Step 3: Click on Install

Click on Install

Click on Install

Step 4: Search Virtualbox and Double click on application.

Virtualbox application

Virtualbox application

VirtualBox application Opened.

VirtualBox in Ubuntu

VirtualBox in Ubuntu

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

Frequently Asked questions

What is Virtual machine, and why would I want to use one?

A software environment that behaves like a physical computer system. We can run multiple operating systems on a single machine. There could be many reasons to use a virtual machine like:

  • To test software in a controlled environment
  • If someone wants to use a particular version of an operating system
  • We can run applications that are not compatible with the host operating system.
  • We use it to create a sandboxed environment for testing malicious software.

For example, if someone wants to run windows environment on Linux system or vice versa, this can be done by using a 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, we need to:

  • Open VirtualBox and click on the “New” button.
  • Enter a name for the virtual machine.
  • Select the operating system and version that we want to install on the virtual machine.
  • Allocate memory, create a virtual hard disk, and configure other settings based on our requirements
  • Some common configurations that we might use include assigning more memory to the virtual machine, creating a larger virtual
     


Last Updated : 10 May, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads