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:
  radvd
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 http://download.virtualbox.org/virtualbox/4.1.14/virtualbox-4.1_4.1.14-77440~Debian~squeeze_amd64.deb

Sample outputs:

--2012-05-08 00:42:52--  http://download.virtualbox.org/virtualbox/4.1.14/virtualbox-4.1_4.1.14-77440~Debian~squeeze_amd64.deb
Resolving download.virtualbox.org... 137.254.16.69
Connecting to download.virtualbox.org|137.254.16.69|: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
OR
# 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) ...
Done.
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
OR
GNOME menu > Applications > System tools > Oracle VM VirtualBox
In KDE, visit:
KDE menu > System > VirtualBox OSE
OR
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

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.