How to install VirtualBox to use Windows or other OS?

I want to use Windows 7 or 8 but I don’t know to install a software like VirtualBox which we have to do with the use of terminal. I don’t want to use Windows as a main OS so I want to use it in VirtualBox. Can you tell me how to install downloaded files in Ubuntu. I once installed java runtime but don’t know the meaning of the lines which I have written in terminal, I just did as the blog posted by a man says.

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

You can use one terminal command:

sudo apt-get -y install virtualbox

When you are asked for the password, type your password. It will not be shown, not even asterisks. The command will take a while, but will finish and get the [email protected]~:$ prompt when it is done.

Reboot for good measure(some kernel modules hate insmod, but it is not important to know what that is)

and then press Alt+F2 and type:


to get Virtualbox open. It will also be in the Unity dash.


Since you downloaded the file, just double-click it so it opens in Software Center. It will still need to download dependencies in any case.

Solution 2

You just need to open a terminal and do:

sudo apt-get install virtualbox-ose

this will install virtualbox from the repositories, but if you want a newer version, you should use:

sudo add-apt-repository "deb lucid non-free" && wget -q -O- | sudo apt-key add - && sudo apt-get update

and then:

sudo apt-get install virtualbox-3.2

Solution 3

Install the latest VirtualBox version (as of writing this, currently 5.1) by using the command line :

Open a terminal (Ctrl+Alt+T) and execute:

wget -O- | sudo apt-key add -  
sudo add-apt-repository "deb $(lsb_release -sc) contrib #VirtualBox"  
sudo apt update  
sudo apt-get install virtualbox-5.1

Solution 4

Installing virtualbox manually:

Go to the virtualbox/Linux_Downloads section download the appropriate deb(32/64bit) file.

save it in your home folder, then, run the following commands:

sudo dpkg -i virtualbox-4.2_4.2.6-82870~Ubuntu~quantal_amd64.deb

note: if you have an other version/architect, just change the file name to the name of the package you downloaded. Or double click the file, and the software-center will provide a one-click install option.

On the same page download the VirtualBox Extension Pack.
The VirtualBox Extension Pack means that you will get Support for USB 2.0 devices, VirtualBox RDP and PXE boot for Intel cards.


install the extension pack with the same version as your installed version of VirtualBox

Solution 5

At today, the latest version of VirtualBox is 4.3.6. You can install it in Ubuntu 13.10 by following these steps in a terminal FOR A 64bit Environment (modify the first link to do it for a 32bit version of Ubuntu). Each line is one command, so paste in order. In addition to download and install the latest package, you will also solve most of the main issues, allowing a proper work of Virtualbox. Tested in a out-of-the-box Ubuntu 13.10.

wget -O virtualbox-436.deb 
sudo dpkg -i virtualbox-436.deb
sudo apt-get install -f -y 
sudo apt-get install dkms
sudo adduser $USER vboxusers 
sudo /etc/init.d/vboxdrv setup

To get the Guest Additions for that version (almost mandatory for running windows):


You should then, once you installed windows in your virtual machine, load that iso and install the drivers to improve the VM’s performance.
That’s it.

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply