Debian Linux: Install Virtualbox Virtualization Software

I‘m a home user and how do I install VirtualBox virtualization software for my home use under Debian Linux 6 operating systems?

Oracle VM VirtualBox (formerly Sun VirtualBox) is a virtualization software package.

You need to install VirtualBox on an existing Linux host operating system as an application. Once installed you can add guest operating systems such as MS-Windows, Fedora, Ubuntu, FreeBSD, OpenBSD and so on.

Option #1: Install VirtualBox using apt-get command

Type the following command as the root user:
# apt-get install virtualbox
Sample outputs:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libvncserver0 virtualbox-dkms virtualbox-qt
Suggested packages:
  libvncserver0-dbg virtualbox-guest-additions-iso vde2
The following NEW packages will be installed:
  libvncserver0 virtualbox virtualbox-dkms virtualbox-qt
0 upgraded, 4 newly installed, 0 to remove and 5 not upgraded.
Need to get 21.6 MB of archives.
After this operation, 65.5 MB of additional disk space will be used.
Do you want to continue [Y/n]? y

Option #2: Install VirtualBox Using Oracle Provided Binaries

This option allows you to install the latest version. You need to download the package here. Please note that package architecture has to match the Linux kernel architecture. For example, if you are running a 64-bit kernel, install the appropriate AMD64 package (it does not matter if you have an Intel or an AMD CPU). You can use the wget command to download .deb file:
$ cd /tmp
$ wget

Sample outputs:

--2012-05-08 00:42:52--
Connecting to||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 70360054 (67M) [application/x-debian-package]
Saving to: `virtualbox-4.1_4.1.14-77440~Debian~squeeze_amd64.deb'

100%[==========================================================>] 7,03,60,054  469K/s   in 2m 32s  

2012-05-08 00:45:26 (451 KB/s) - `virtualbox-4.1_4.1.14-77440~Debian~squeeze_amd64.deb' saved [70360054/70360054]

You can use dpkg command to install .deb package, enter:
$ sudo dpkg -i virtualbox-4.1_4.1.14-77440~Debian~squeeze_amd64.deb
# dpkg -i virtualbox-4.1_4.1.14-77440~Debian~squeeze_amd64.deb
Sample outputs:

Selecting previously deselected package virtualbox-4.1.
(Reading database ... 196053 files and directories currently installed.)
Unpacking virtualbox-4.1 (from virtualbox-4.1_4.1.14-77440~Debian~squeeze_amd64.deb) ...
Setting up virtualbox-4.1 (4.1.14-77440~Debian~squeeze) ...
Adding group `vboxusers' (GID 124) ...
Stopping VirtualBox kernel modules:.
Uninstalling old VirtualBox DKMS kernel modules:.
Trying to register the VirtualBox kernel modules using DKMS:.
Starting VirtualBox kernel modules:.
Processing triggers for shared-mime-info ...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for python-central ...

How do I start Virtualbox?

In GNOME, visit:
GNOME menu > Applications > System tools > VirtualBox OSE
GNOME menu > Applications > System tools > Oracle VM VirtualBox
In KDE, visit:
KDE menu > System > VirtualBox OSE
KDE menu > System > Oracle VM VirtualBox
You can also type the following command using an X terminal:
$ virtualbox &
Sample outputs:

Fig.01: Oracle VM VirtualBox in action

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 3 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
3 comments… add one
  • Alan Jun 17, 2012 @ 13:15

    I’m running Ubuntu 10.04 (lucid)
    Kernel 3.0.0-13-lowlatency-pae (#21~ppa1-Ubuntu SMP PREEMPT Tue Oct 18 07:50:35 UTC 2011)
    Oracle VB 4.0.16r75491
    and when I try to start a machine I get:

    Terminated with error code 1

    Result Code:
    NS_ERROR_FAILURE (0x80004005)
    IMachine {662c175e-a69d-40b8-a77a-1d719d0ab062}

    Kernel driver not installed (rc=-1908)

    The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing

    ‘/etc/init.d/vboxdrv setup’

    as root. Users of Ubuntu, Fedora or Mandriva should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.

    When I run “‘/etc/init.d/vboxdrv setup'” I get errors saying it can’t find Linux headers.
    Any idea what went wrong and how to fix it?
    I have tried other versions with the same result.

  • Angel Le Blanc V.B Feb 18, 2013 @ 0:41

    Don’t you forget tell us we should add ourselves to virtualbox group?

  • Khamkon Oct 14, 2014 @ 15:04

    I want to see this website because i don’t know how to install the debian in virtlualbox in windows 7 64bit

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum