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.

Asked By: sus hill


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 user@computer~:$ 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.

Answered By: nanofarad

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
Answered By: Evandro Silva

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

Answered By: blade19899

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.

Answered By: Rho

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
Answered By: hg8



# Install VirtualBox Version 7.0 on Debian-based Linux

# Add a line for the oracle virtualbox debian package to /etc/apt/sources.list
# (you can use echo/append). Replace "jammy" with your distribution name.
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] jammy contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list

# Download and register the GPG armorfile containing the public key. Extract
# the public key from the armorfile to the OS keyring.
wget -O-|sudo gpg --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg --dearmor

# Check if the fingerprint of the key matches what's listed on virtualbox
# website. If it doesn't match print something and exit.
if ! gpg --show-keys /usr/share/keyrings/oracle-virtualbox-2016.gpg|grep -q B9F8D658297AF3EFC18D5CDFA2F683C52980AECF; then 
  echo Public key /usr/share/keyrings/oracle-virtualbox-2016.gpg does not have the correct fingerprint.
  exit 1

sudo apt-get update
sudo apt-get install -y virtualbox-7.0

# References
Answered By: angstyloop