Logo

dev-resources.site

for different kinds of informations.

How to Install VirtualBox on Kali OS(2022)

Published at
4/26/2022
Categories
penetrationtesting
kalilinux
development
virtualbox
Author
leomiscoding
Author
12 person written this
leomiscoding
open
How to Install VirtualBox on Kali OS(2022)

A few weeks back, in one of my learning, I was to install VirtualBox on my kali OS, but I wasnโ€™t able to install it. I downloaded the VirtualBox installer twice and all gave the same error. I was stalked for a couple of days before I found a way around it and it worked for me.

I did the installation through the terminal, here are the steps.

Firstly, I did uname -a which check my system information, and what I was after in the information was the version of my kernel 5.16.18-1kali7amd64.

Then I did uname -r which showed me the release version of my kernel. I have the information I needed, now letโ€™s go further.

We need to install the Linux kernel header because that is what is conflicting with installing the VirtualBox.

linux-headers is a package providing the Linux kernel headers. These are part of the kernel, although they are shipped separately.

The headers act as an interface between internal kernel components and also between userspace and the kernel. Packages like sys-libs/glibc depend on the kernel headers.

You have to have it if you need to compile kernel modules, and in Linux it is widely used as there are packages which comes as a source and then compiled and linked with the kernel when downloaded. This gives you the ability to link with multiple kernel versions as long as the kernel API hasnโ€™t changed.

So, next is installing the Linux header using sudo apt install linux-headers-$(uname -r | sed โ€˜s,[^-]*-[^-]*-,,โ€™). This should install the Linux header for your kernel version. While installing the header, you might encounter a failed to install error, kindly solve that by using this command sudo apt --fix-broken install. The error occurred because you have tried to install software and it failed, it still resides in the system memory and needs to be removed. After the error has been resolved, retry installing the Linux header.

After the header has been installed, then install the Linux Image of the header you just installed. Using sudo apt install linux-image-$(uname -r | sed โ€˜s,[^-]*-[^-]*-,,โ€™).

Linux-image is the kernel binary. Linux headers is the source header files. Thereโ€™s no reason to include them together, debian keeps dev packages and binary package seperate. In a simple term: linux-image contains the kernel image and the modules, while linux-headers contains the kernel headers.

After the above steps, what is next is to install the build-essential package

A meta-package is what build-essential is. It does not install anything on its own. It is instead a link to a number of other packages that will be installed as dependencies.
Essentially, the build-essential package provides you with everything you need to compile basic C and C++ software on Linux.
If you wanted to, you could install each of these packages separately. The build-essential meta-package, on the other hand, makes it straightforward to get everything you need in one package.
While build-essential is a solid starting point for compiling more difficult software on Linux, you may need to install extra libraries.

Install the build-essential package using sudo apt install build-essential dkms.

We are done installing all that is needed for us to install the VirtualBox on our Kali OS. Next is to now install the VirtualBox and its extension pack.

sudo apt install virtualbox virtualbox-ext-pack Will help you install it.

We are done, VirtualBox is now successfully installed on our machine.

Do you want to test it? Type virtualbox in your terminal, hit the enter button and watch VirtualBox load.

Enjoy your day.

kalilinux Article's
30 articles in total
Favicon
Comprehensive Guide: Setting Up Gestures on Linux (Debian-Based Distributions)
Favicon
Master Password Attacks in Minutes! Ethical Hacking Guide ๐Ÿ”“
Favicon
How Hackers Use SS7
Favicon
Endpoint Security Bypass EXPOSED! Hackers Don't Want You to Know This!
Favicon
How to Set Up an Access Point with a Fake Captive Portal
Favicon
Kali Linux Basics: Your Gateway to Ethical Hacking
Favicon
Instalar BeEF en Kali Linux 2024
Favicon
Happy birthday #linux
Favicon
Linux OS & Basic Commands
Favicon
Getting Started with Kali Linux A Beginners Guide
Favicon
Kali Linux For Beginner
Favicon
Is Your PC Safe? How to Block Password Unlockers Like Chntpw in 2024๐Ÿ’ป๐Ÿ”
Favicon
Automatically Change IP Address ุชุบูŠุฑ ุงูŠ ุจูŠ ุจุดูƒู„ ุชู„ู‚ุงุฆูŠ ูƒุงู„ูŠ ู„ูŠู†ูƒุณ
Favicon
Manage Those Users
Favicon
What is File Manipulation?
Favicon
Installing Essential Software on Kali Linux: Browsers, Office Suite, Code Editors, and More
Favicon
How to Change Linux Password Quickly and Easily
Favicon
Advance Free Debugger
Favicon
Hack WiFi using Kali Linux
Favicon
[Help me] Linux in the Virtual Machine
Favicon
Web simulation of Kali Linux
Favicon
Is hacking only done in Linux?
Favicon
Install Kali Linux 2022.2 On Your Android Device
Favicon
How to Install VirtualBox on Kali OS(2022)
Favicon
KALI LINUX: Common Commands that you should know : PART ONE
Favicon
Setting up and Using BloodHound in Kali Linux
Favicon
Configuring AWS EFS to work with Kali Linux running on AWS EC2
Favicon
Black-Tool
Favicon
How to vs code in Kali linux
Favicon
How to install nuclei in any linux โ˜ ๏ธ

Featured ones: