With the help of VirtualBox, you can easily use any operating system you want without worrying about the installation process. This is the same as running a virtual machine, only it’s done locally.
The VirtualBox program can also be run on Linux OS, you know, but the installation process is a little different from Windows, because there are some additions that must be done so that this program can be used fully without any problems.
And in this article, I will share a tutorial on installing VirtualBox on Android Ubuntu version 18.04 through terminals. And as long as you follow the steps to completion, of course the VirtualBox program can be run immediately.
Tutorial on Installing VirtualBox on Linux Ubuntu 18.04
Just start by installing GPG keys VirtualBox with the command below:
wget -q https://www.virtualbox.org/download/oracle_vbox_2022.asc -O- | sudo apt-key add - wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
If successful, will appear “OK” on the terminal. This is a sign that the GPG keys have been successfully imported.
The next step is to install the APT repository for VirtualBox, please copy the following command:
sudo add-apt-repository "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib"
If so, now is the time to install the VirtualBox program. And here what will be installed is version 6.0. Here’s the command:
sudo apt update sudo apt install virtualbox-6.0
At this point VirtualBox should be installed and can be opened directly from the desktop. Or you can also run it with the command
If no error code appears in the terminal, it means that VirtualBox is running correctly.
Installing Additional Pack Extensions
Extensions are additional features that I think are important to install. It will provide some new functionality support like virtual USB 2.0 & 3.0, RDP, image encryptionand many more.
To install the extension, please start by downloading it. Here is the command:
After that the process of importing the extension into VirtualBox. To do so, please use the following command:
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-6.0.0.vbox-extpack
There will be a confirmation dialog, please type y and then ENTER to continue.
The last stage is the process of installing the extension, here are the commands:
sudo apt update sudo apt install virtualbox virtualbox-ext-pack
Now the extension is successfully installed. And as a suggestion, please restart VirtualBox to make sure the extensions are installed properly.
Also read: How to Open VMDK Files on VMware
Some Errors of VirtualBox Installation and Solutions
Sometimes the installation of VirtualBox is not as smooth as one might think. Only sometimes an error message appears which causes VirtualBox to not be installed properly. But for most problems, it can be solved with this command:
apt install -f
The command above serves to fix errors in the installation process, for example, such as incomplete packages, so VirtualBox fails to install.
Another error is popping up a notification dialog like this
The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv.
This problem occurs because there is an error in the kernel driver that is not running. And the solution is to start it manually by typing the command below:
sudo modprobe vboxdrv
Or you can also reinstall virtualbox-dkms to simultaneously install the appropriate linux kernel headers. Here is the command:
sudo apt-get --reinstall install virtualbox-dkms
Don’t forget to do reboot system to ensure linux kernel headers are updated successfully and fully functional for VirtualBox.
The final word
Installing VirtualBox can actually be very fast. But sometimes there are errors that make it a little longer to fix. But you don’t have to worry, because this kind of problem is very rare. And if it happens it can still be overcome.
If you have problems with installing VirtualBox, please write down the problem in the comments column to get help.
Hopefully useful and good luck