How to Install Debian 8 Jessie as a virtual machine

To celebrate the release of Jessie (Debian 8) as the new stable version of Debian, here comes a tutorial to install it as a virtual machine (VM) on your computer: How to create a Debian virtual machine with VirtualBox?

You will need to download and install VirtualBox, the Oracle software that allows you to run any OS on… any other OS, as a virtual environment. This procedure is a lot safer than a dual boot: no need to fool around with boot sector or disk partitions, all is virtually recreated. The counterpart is that your computer resources are shared by two OS’s. To avoid any performance issue, we’ll choose a lightweight but efficient desktop environment.

This tutorial will use the XFCE Debian edition, that you can download here. XFCE is not the most recent desktop environment, however it is among the most powerful, lightweight and customizable, while being easy to use with its classic desktop metaphor. Imagine an improved version Windows XP and you’ll get the felling. A great way to get started with Linux.

Create your virtual system

Once installed, start VirtualBox and follow these steps. We’ll begin with the VM configuration:

  • New > Name, Type (debian), Version 64
  • General > Advanced > Activate clipboard and Dra’n’drop
  • System > check memory, deactivate Floppy, check the nb of CPU (2)
  • Display > max video memory, enable 3D acceleration
  • Storage > select your Debian iso under “Controller IDE”
  • Shared Folders > Choose which folder to share between your systems. We’ll get back to this function later.
VM configuration
VM configuration (in animated gif, yeah!)

We are now ready to run the distribution installation.

Run Debian installer

Select your virtual machine and click the “Start” icon. The Debian graphic installer is straightforward : follow the steps, when asked enter a root password, create your user (name, username, password).

Once you get to the partitioning, select “Guided, use entire disk, all in one partition“. If you wish to modify the size of the swap partition, you may select the manual partitioning, or proceed later with gparted, the partitioning utility tool.

Proxy, part #1: select your network mirror. If you need to configure a proxy, use the following syntax in the required field: http://user:pass@host:port/.

Proceed to the installation. Once it’s done, you’ll have to choose where to install Grub (the boot loader package): because this is a VM install, choose /dev/sda (ata-VBOX_HARDDISK). This would be the tricky part if you were installing in dual-boot, so enjoy the comfort of a VM!

VM installation
Installing Debian on VirtualBox

Now reboot the VM.

First boot & updates

At startup the Grub menu is displayed, stick with the default entry and wait for your system to initialize. At XFCE first start, you’ll be asked to choose between two panel setups, select the default config.

DebianXFCE
Debian 8 default desktop

Check your time configuration. If incorrect, launch as root a dpkg-reconfigure tzdata and select your country.

Proxy, part #2 (if needed): during install you entered your proxy address for apt connection (repositories connection). It is has been written inside the file /etc/apt/apt.conf, and can be modified any time. I use nano as command line text editor, change at will.

[root] $ nano /etc/apt/apt.conf
Acquire::http::Proxy "http://user:password@proxy.address:port/";

Now add the proxy setting for the entire system:

[root] $ nano /etc/environment
http_proxy=http://user:password@proxy.address:port/
https_proxy=http://user:password@proxy.address:port/
ftp_proxy=http://user:password@proxy.address:port/

Congratulation, you are now a confirmed Linux user! Let’s update and install some useful tools, then we’ll modify the default UI. To use the full capacity of your VM you need to install a complementary VirtualBox extension called Guest Additions. To do so, some dependencies are required.

Check your sources, remove the CD entries, add the contrib and non-free repos:

[root] $ nano /etc/apt/sources.list
deb http://ftp.fr.debian.org/debian/ jessie main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free

Update your system:

[root] $ apt-get update && apt-get dist-upgrade

Install the Guest Additions requirements

[root] $ apt-get install build-essential module-assistant
[root] $ m-a prepare

Insert the Guest Additions CD image (Host + D), go to the root of the mounted drive and execute the program:

[root] $ sh ./VBoxLinuxAdditions.run

Reboot.

Customize your system…

… to get something a little more modern.

Debian8-desktopTerminal

The terminal is one of the most useful tool on a Linux system. Spend some time making it pleasant to look at: enable your prompt color in .bashrc, add your aliases, enable colors and auto completion in root bash.

$ nano ~/.bashrc

uncomment the “force_colored_prompt=yes” line

[root] $ nano .bashrc
# set a fancy red prompt
PS1='${debian_chroot:+($debian_chroot)}\[33[01;31m\]\u@\h\[33[00m\]:\[33[01;34m\]\w\[33[00m\] \$ '
# enable auto-completion
if 
  [ -f /etc/bash_completion ] && ! shopt -oq posix; 
  then . /etc/bash_completion 
fi

Fonts

Enable font hinting  in the Appearance panel to get the best font rendering possible. Settings > Appearance > Fonts > Enable anti-aliasing + Hinting Slight + Sub-pixel order RGB. This should be enough in Jessie, no need to create any fonts.conf file or install the Infinality engine.

I recommend using Adobe Source Code Pro monospace font for Terminal and Google Roboto font for your desktop environment.

Screenshot - 04302015 - 06:52:16 PM
Debian XFCE with guest additions, Lightbird GTK and Faience icons

Themes and icons

GTK Themes, windows decoration and iconsets are the most important elements to customize your desktop make it look awesome (that is a very, very, subjective notion). Start with installing some complementary gtk engines that are needed by some themes:

[root] $ apt-get install gtk2-engines-murrine gtk2-engines-pixbuf dmz-cursor-theme 

I recommend installing the Lightbird theme by Netonardin, which is a collection of nice and polished themes based on the classic Greybird. It comes with a collection of windows decoration.

Complete your theme with the Faenza & Faience iconsets, or Moka & Faba (don’t forget to get the Faba colors addition) if you like a more colorful and rounded approach.

Screenshot - 05012015 - 11:50:43 AM
Faba Colors iconset, icons-only bottom panel

Additionnal tools

Useful programs to have, choose according to your needs.

[root] $ apt-get install imagemagick unrar unzip p7zip-full vim transmission vlc suckless-tools xfonts-terminus htop alpine scrot moc xfce4-whiskermenu-plugin

Whiskermenu is a lightweight “Start menu” to add in your panel, including a search box. Bind a key in the keyboard settings for the command xfce4-popup-whiskermenu (Windows left key for instance).

Wallpapers are stored in /usr/share/xfce4/backdrops/. You can copy yours in the directory and then select them throught the Desktop setting panel. Or rightclick an image, wherever its location, and select “Set as wallpaper“.

That’s all folks. I may update the post later with some config files on github.

Advertisements

3 thoughts on “How to Install Debian 8 Jessie as a virtual machine

  1. WTF IS THIS!?!? this is probably one of the very best, if not the bet simple and pleasant xfce desktops i’ve seen. EVER.
    thanks, mate!

Comments are closed.

Blog at WordPress.com.

Up ↑