Friday, December 27, 2013

How to install and configure Debian

Debian is one of the many GNU/Linux operating systems. Ubuntu, perhaps the most popular GNU/Linux system, is based on Debian. Having used Ubuntu for a few months and irked by some persistent instability issues, documented in my previous post, I decided to try out the current version of Debian. Debian is supposed to be extremely stable, but for some reason the current version is codenamed 'Wheezy'. I hope this is not a reference to its performance!
In this post I explain what I did to install Debian and importantly to make it usable.

Last Friday I installed Debian on my laptop. I first backed up my data on an external hard disk and burned the Debian installation file on a CD. I restarted my computer and booted from the CD. Nothing happened. I saw the Ubuntu login screen instead of the Debian installer. The Debian website says something about how to get CDs to work but I wanted to try the USB drive option. This time it worked. Debian got installed. Well, that's to cut a long story short. It took nearly 6 hours to install Debian mainly because of a slow downloading stage when more than 1300 packages were obtained from a Debian server. This could have been avoided if I'd used a larger installation file I think. Also, I am on a 512 kbps connection -- not great for fast downloads.

During the installation, I didn't have to do much apart from selecting the default options whenever I was asked to. I even went out for a couple of hours in between, with the blue installation screen glowing in the dark house.

Getting started with Debian installation is not very easy. It's supposed to have become simpler over time but it's far from being as easy as installing Ubuntu. So I was worried about whether I would be able to handle the configuration after installation. I'm not a GNU/Linux expert and rely heavily on information on user forums and the Debian website.

Making my user account "powerful"
To my relief Debian got installed after an uncertain start. So I could begin with the configuration -- all the things I've described below. As the first step I had to gain superuser privilege. To add software or edit configuration files on Debian one needs to perform actions as a "superuser". I first added myself to the superuser group by following the instructions given in

Getting wi-fi to work
After installation wi-fi did not work, as I'd expected. Many wi-fi chipsets require firmware that is not free. Debian in its pure form accepts only free software and firmware.

So I figured out which wireless chipset I have:

I downloaded the package for the firmware for my wireless chipset:

And I installed the package from the command line:
# dpkg -i filename.deb

Setting up the package manager
Packages in GNU/Linux are installation files for software. Packages should ideally be found and added from a package manager such as Synpatic that comes with Debian. In this process, installation is point-and-click and the command line is not needed.

By default only free packages are listed in Synaptic. These free packages are stored in Debian server mirrors around the world. To make Synaptic list non-free packages, I added these lines to the file sources.list in the folder /etc/apt/

deb wheezy main non-free
deb wheezy main contrib

To edit text documents I like to use gedit, one of many text editors available for GNU/Linux systems.

If you're used to Windows or Mac and see a fresh Debian install you might be shocked at how bad or rough the fonts look. Many of the fonts we're used to are actually proprietary fonts owned by Microsoft or Apple. Free equivalents of common fonts are available but these are "free" in the price sense, not the "freedom" sense I think. Debian recommends that people use truly free fonts such as those in the Liberation series (Liberation sans, Liberation serif, etc.).

I am unfortunately too used to Microsoft fonts so I installed these fonts through Synaptic.

The Microsoft fonts installation file is ttf-mscorefonts-installer. Within this is contained Arial, Verdana, Times New Roman, Courier, etc. But these fonts don't look quite like what you might be used to. So I applied font smoothing by following the instructions given in This required me to create a new text file and copy-paste the code given.

Skype is a good example of a free application where "free" is like "free beer" but not "free speech". Skype is thankfully available for GNU/Linux systems (Debian, Ubuntu, Red Hat, etc.). I really need Skype for my work.

To install Skype I downloaded the .deb file (the extension for installation files in Debian) from the Skype website ( but ended up having to do some things to make it work, following the instructions given in

Copying my files from an external hard disk
When you connect a USB drive or external hard disk to your computer you expect it to open. Not so easy in Debian! I had to mount my external hard disk following instructions in But this seems to be a one-time process. When I connected the hard disk again it was automatically detected and I did not have to mount it.

Setting up my wireless printer and scanner
I have a Canon MG3100 wireless printer and scanner at home. I set up my Canon printer using an installation file downloaded from the Canon website:

Then I set up the scanner using the 'scangearmp' program from

Java for online banking
For doing online banking with my bank, I need to cross a login stage where Java is used. To set up Java I installed two packages: openjdk-7 and icedtea-7-plugin from Synaptic.

With all this my laptop became pretty much ready for use, but I'm sure I'll be doing more installations and tweaks in the coming weeks!


  1. If you installed AMD64 and your audio works, you're one of the lucky few. Wheezy continues to distribute broken kernel modules for the most common sound cards. Stable, indeed! If you don't feel like compiling your own kernel and you think audio is a basic requirement for a computer in the current century, don't install Wheezy.

  2. There is a Debian installation image available which includes firmware. If you had used it, things would have been easier. In any case, installation can be done with a wired connection. This image doesn't include all drivers; some people may need the non-free package broadcom-sta.

    In the sources.list file, contrib and non-free can be written in a single line. If you use the image with firmware you get this line automatically as far as I know.

    If you use a desktop like gnome (the default) you get goodies like network-manager and synaptic automatically. And usb devices are automounted. You may have to wait a few seconds.

    It is not necessary to make your user account powerful. Just type "su" to get the root prompt. If you install gksu, you can get a root terminal directly.

    An external hard disc can be mounted by typing "mount /media/usb0" as root. You may have to have ntfs-3g installed.

  3. When you install Debian first time around, it's a bit of a faff getting it set up, but the stability you get in the long run is worth it.

    That said, there are a few easy shortcuts for these issues.

    To give yourself superuser privileges and avoid using the root account, just don't supply a root password during installation. You'll then be prompted to create a "shadow" password. This is just the same as what you've done but much faster.

    During installation, you can also save time by having the wifi firmware file on a usb and inserting it when prompted. You will then be able to download packages over wifi once you have your network set up in the installer. An added bonus is that when you log in for the first time, the wifi will connect to that network automatically.

    Lastly, the Debian Sources Generator over at is a fantastic tool for getting your sources.list file set up nicely. You'll notice that instead of having two lines like

    deb wheezy main non-free
    deb wheezy main contrib

    you can have just one with all the sub-options:

    deb wheezy main contrib non-free

    Enjoy Debian!

    BTW Debian releases are named after characters in Toy Story, hence "Wheezy".