Debian 9: Install VirtualBox for virtualization

This article will describe installing VirtualBox.

1 Install VirtualBox

The following script installs virtualbox package.

#!/bin/sh

cat <<EOF | sudo tee /etc/apt/sources.list.d/virtualbox.list
deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib
EOF

wget -O - -q https://www.virtualbox.org/download/oracle_vbox_2016.asc | \
  sudo apt-key add -
sudo apt update -y

sudo apt install -y virtualbox-5.1

2 Run VirtualBox

Run virtualbox command.

$ virtualbox

0001_VirtualBox.png