The Wayback Machine - https://web.archive.org/web/20241004193500/https://www.geeksforgeeks.org/how-to-install-virtualbox-in-linux/
Open In App

How to Install VirtualBox in Linux?

Last Updated : 10 May, 2023
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

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
     


Similar Reads

How to Install Kali Linux VirtualBox Image?
Kali Linux is considered as the best perpetration testing Linux distribution as it comes with every important tool pre-installed in it. If you have a spare system you can directly install Kali into it, but if you plan to use it in a virtual environment then the best and safest method would be to use VirtualBox in your system. You can download Virtu
2 min read
How to Install Kali Linux in VirtualBox?
Dual Booting a Windows Laptop with Kali Linux, Though increases the speed and efficiency of the OS, but we can not switch between Windows and Kali Linux instantly. To do so, we will have to install Kali Linux in Virtual Box or any other hypervisor. So, what is a hypervisor? Refer to this article Hypervisors. So now, whenever we want to switch betwe
5 min read
How to Install Garuda Linux on VirtualBox?
Garuda Linux is a rolling distribution that is based on the Arch Linux operating system, except, like Arch Linux, Garuda Linux comes with a graphical installer which is useful for easy installation, and also has other advanced graphical tools for managing one's system. It is a performance-oriented Linux distro with many performance-enhancing tweaks
3 min read
How to install CSI Linux in VirtualBox?
What if there is a multi-purpose operating system designed especially for cyber investigators, yes you read it right and the answer to that question is, yes there is one such operating system known as CSI Linux. It is an open-source 'theme park' for the cyber security industry enthusiast. It has tons of resources for investigations, analysis, and r
3 min read
How to Install RHEL 8 on VirtualBox ?
Red Hat Enterprise Linux (RHEL) is a Linux-based operating system from Red Hat designed for businesses. RHEL can work on desktops, on servers, in hypervisors, or in the cloud. Red Hat and its community-supported counterpart, Fedora, are among the most widely used Linux distributions in the world. The best way to run two or more Operating Systems si
4 min read
How to Install Deepin on VirtualBox?
Deepin is a Debian-based distribution that aims to provide a user-friendly, user-friendly and reliable operating system. It does not only include the best open source world has to offer, but also it has created its own desktop environment called DDE which is based on the Qt 5 toolkit. It focuses much of its attention on intuitive design. Features:N
3 min read
How to Install VirtualBox on Windows?
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
1 min read
How to Install Ubuntu Budgie in Virtualbox?
Ubuntu Budgie is a community-developed distribution, integrating the Budgie Desktop Environment with Ubuntu at its core. Whether you use it on an old computer or a powerful workstation, Ubuntu Budgie is adaptable to any device, keeping them fast and usable. It combines the thoroughly-tested and stable Ubuntu core with a modern, lightweight, and tra
4 min read
How to Install Kubuntu on VirtualBox?
Kubuntu is the flavor of the Ubuntu operating system which uses the KDE Plasma Desktop instead of the GNOME desktop environment. Kubuntu 21.04 features the beautiful KDE Plasma. It comes with updates to many core packages, including KDE Frameworks 5.68, Plasma 5.18 LTS KDE Applications 19.12.3, and a new 5.4-based kernel. Features:Provides complete
3 min read
How to install Kioptrix Level 1 on VirtualBox
Kioptrix is a downloadable VM image file on Vulnhub. It is a VM image challenge to get root access by any means possible. The goal of these is to learn the basic tools and techniques in vulnerability assessment and exploitation. There is more than one way to complete the kioptrix challenge by getting root access. There is a total of 5 kioptrix vuln
2 min read
How to install Metasploitable 2 in VirtualBox
Let's first discuss what Metasploitable is, it is a testing environment that is very useful for beginner who wants to practice and test their penetration testing skills and security research. It is a target machine that is used to discover and penetrate vulnerabilities so that the user gets an idea of real-life targets and machines. In other words,
5 min read
How to install Ubuntu on VirtualBox?
Installing Ubuntu on VirtualBox is a great way to experience the powerful features of this popular Linux distribution without altering your main operating system. Whether you’re a developer, a student, or simply curious about Linux, setting up Ubuntu on VirtualBox allows you to test and explore in a safe environment. This guide will walk you throug
6 min read
How to Run Multiple Virtual Machines Windows and Linux Inside VirtualBox?
Virtual Machines are the software applications/files which emulate the physical computers. This process of emulating a physical computer and making able to run instances of it on a single physical machine is called Virtualization. A Virtual Machine (VM) allows us to run multiple or different Operating systems on a single physical machine and share
11 min read
How to Enable Copy and Paste in Oracle VirtualBox?
In this article, we will see how to enable copy and paste from a Windows host to a VirtualBox and vice-versa. We've taken the VirtualBox guest additions which gives us various additional tooling, specifically giving us the ability to copy and paste. It also enables bi-directional copy and pastes. Step 1: Start the Virtual Box and go to Settings as
1 min read
Installing Backtrack on VirtualBox
BackTrack Linux is a custom distribution that focuses on security testing for all skill levels. It is the largest collection of wireless hacking, server exploiting, web application assessing, social-engineering tools which can be found in a single Linux distribution. BackTrack Linux is a fine example of how a specialized Linux distribution should b
2 min read
Virtualbox - Virtualization is Enabled but not Working
Virtualization is a technique to separate a service from the underlying physical delivery of that service. It is the process of creating a virtual version of something like computer hardware. Sharing the underlying physical hardware with other virtualized resources, this virtualized resource functions independently like a real thing. Enhancing flex
4 min read
How to install and configure Docker on Arch-based Linux Distributions(Manjaro) ?
In this article, we are going to see how to install and configure Docker on Arch-based Linux Distributions. Docker is an open-source containerization platform used for building, running, and managing applications in an isolated environment. A container is isolated from another and bundles its software, libraries, and configuration files. Containers
2 min read
Install Pytorch on Linux
In this article, we are going to see how you can install PyTorch in the Linux system. We are using Ubuntu 20 LTS you can use any other one. To successfully install PyTorch in your Linux system, follow the below procedure: First, check if you are using python’s latest version or not. Because PyGame requires python 3.7 or a higher version, make sure
2 min read
How to Install Deepin on Linux?
Deepin is the top Linux distribution from China, it provides a beautiful, easy-to-use, safe, and reliable operating system for global users. Deepin is based on Debian's stable branch. The feature that sets Deepin aside from the rest of Linux distributions is its desktop environment known as DDE Deepin Desktop Environment, which was described as "th
3 min read
How to Install Linux on Windows PowerShell Subsystem?
There are several ways to Install a Linux subsystem on your Windows PC Powershell Environment. It is good for learners, but it is recommended using original Linux OS if you are a developer as the Subsystem lacks the pre-installed Linux tools. Before we begin installing a Linux subsystem, we need to first enable a Windows feature for Subsystems. Ena
2 min read
How to Install Katoolin on Linux Mint?
When the question comes which Linux Distro is best for ethical hacking then this becomes typical to choose with. Everyone likes the different environment, looks and feel. At last, they find that there is no perfect Distro. There is one way that we can add all Kali Linux Hacking tools in any other Linux Debian based Distro using Katoolin. Katoolin i
2 min read
How to Install Lazy Script in Kali Linux?
Kali Linux is one of the most advanced hacking OS systems from Linux family. Kali Linux is filled with many hacking tools and supporting learners and hackers worldwide. There are many versions of Kali Linux which provides a good user interface and desired environment. The Lazy Script is designed to help many users to save time and work. The script
2 min read
How to install Virtual Box in Kali Linux
We all have seen that we find lots of installation walkthroughs about how to install a virtual box in windows and run kali Linux on that. But in this installation guide, we are going to show you how you can install Virtual box in the Kali Linux Operating system. Let's start. How to install Virtual Box in Kali Linux Step 1: Launch your kali Linux en
2 min read
How to Download and Install Python Latest Version on Linux?
Python is a widely-used general-purpose, high-level programming language. This article will serve as a complete tutorial on How to download and install Python latest version on Linux Operating Systems. On every Linux system including following OS, Ubuntu Linux Mint Debian openSUSE CentOS Fedora and my favourite one, Arch Linux. You will find Python
3 min read
How to Install Z Shell(zsh) on Linux?
The ZSH or Z Shell is a Unix based shell or can be called as a command-line interpreter. It is an extended version of the good old Bourne shell (sh). It does have some features form Bash with lots of added features like automatic cd (Change Directory), spell check, path expansion, and many more. It also supports plugins and themes. Installing ZSH o
2 min read
How to install Jupyter Notebook in Linux?
Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations, and narrative text. Uses include data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more. Jupyter has support for over 40 differ
2 min read
How to Install Python Pycharm on Linux?
Prerequisite: Python Language Introduction Python is a widely-used general-purpose, high-level programming language. It was initially designed by Guido van Rossum in 1991 and developed by Python Software Foundation. It was mainly developed for emphasis on code readability, and its syntax allows programmers to express concepts in fewer lines of code
2 min read
How to Install OpenCV for Python in Linux?
Prerequisite: Python Language Introduction OpenCV is the huge open-source library for computer vision, machine learning, and image processing and now it plays a major role in real-time operation which is very important in today’s systems. By using it, one can process images and videos to identify objects, faces, or even the handwriting of a human.
2 min read
How to Install and Configure Apache Subversion(SVN) In Linux?
Apache Subversion (SVN), is a version control system like Git. it is distributed under an open-source license. SVN was created by CollabNet Inc. but now it is developed as a project of the Apache Software Foundation. Downloading and Installing Apache SVN Apache Subversion(SVN) can be easily downloaded and installed with the use of the command-line.
2 min read
How to Install Numdifftools in Python on Linux?
Numdifftools is a Python-based toolkit that solves numerical differentiation issues in one or more variables automatically. To produce the most accurate outcome, finite differences are exploited adaptively in conjunction with a Richardson extrapolation mechanism. This library is cross-platformed, so it can work with Windows, Linux, and even with ma
2 min read
Article Tags :
Practice Tags :