Appendix D. Alan's Quick Start Guide to Debian for Programmers

Table of Contents

D.1. The apt System
D.2. update-alternatives

[ fromfile: debian-tips.xml id: debian-tips ]

Abstract

This article is a summary of steps I take to set up a new Debian desktop for development. It is useful for the developer who is new to the Debian Linux desktop environment and wants to take advantage of the apt system.

After trying out a number of different Linux distributions, I currently use a Debian Testing KDE installer,[129] which I find ideal for my purposes: C++ / Java / Python / Qt / KDE development.

[Important] Question

Why Debian?

  1. There is a ridiculously huge number of packages available, many that are hard to find from other distributions. This means that you can grab already-compiled binary packages of almost every library instead of building your own from source.

  2. Debian testing seems to contain reasonably up-to-date Qt and KDE packages.

  3. Many KDE/Qt developers do their work in Debian or Kubuntu.

  4. Debian and Ubuntu distributions offer a powerful package management system known as apt, which is quite straightforward to use, and easy to fix when you break it.

[Important] Question

Why KDE?

KDE is the favorite desktop environment of both authors of this book. Both of us use and prefer many of the desktop utilities that come with KDE to the comparable apps that come with other desktop environments (e.g., Gnome). In addition to being a well designed, user-friendly environment, it has the advantage of having been written in C++ with Qt.

Recommended Debian-based Linux Distributions

The distributions below all have important things in common: they are bootable, which means you can boot your computer from the CD or USB Stick image and run Linux without installing anything on your hard drive. But you can also install a full Debian-based Linux on your hard drive from the same CD or USB Stick. All of these recommended distributions are free and can be easily downloaded from various websites.

  1. Debian has been one of the main "basic" distributions for several years. Initially, Debian's excellence was recognized but it was thought to be too difficult for beginners to install. Several other distributions that are essentially façades for Debian, with simplified, user-friendly setup scripts, have come and gone over the years. Hardware detection and recognition has been one of the principal areas of difficulty in setting up a system. One of Debian's strengths (You can customize your installation so that it is exactly tailored to your hardware) was also its main drawback (You had to know how to find drivers for your hardware to setup your system). Recent versions of Debian have much friendlier setup scripts. You can download a "netinst" iso image, burn it to a CD or USB Stick, boot from it, and install to your hard drive with a minimum of difficulty. Personally, I would recommend the latest debian-live-kde-desktop.iso cd image from debian.org because it boots as a liveCD and installs a recent KDE Desktop.

  2. Ubuntu is probably the most popular Gnome-based distribution as we go to press.

  3. Kubuntu (KDE-based Ubuntu) is like Ubuntu, but KDE-based instead of Gnome-based.

[Important] Question

Stable? Testing? Unstable? That sounds scary. Why would anyone use an operating system that is anything but stable?

Many people new to Debian are intimidated by the use of the word "unstable" to describe any distribution of Linux. Because the other two choices are "testing" and "stable," it's natural that people would try the stable first. Unfortunately, the versions of most applications and libraries offered in stable are fairly old (at least a year, sometimes more), and some of your favorite packages may not be available. It might be preferable to use newer software for a desktop/development system. "testing" is a nice compromise between unstable and stable. Typically, the Debian testing installers support more recent hardware, too. As they are being developed, the Debian versions are given nicknames that have origins in the various "Toy Story" movies.[130]

stable ("squeeze") is the current stable release. It includes Qt 4.6. The versions available are tested thoroughly.

The testing ("wheezy" in 2011) distribution is currently using Qt 4.7, and contains versions that will not end up in stable, but will be in the next major release.

The unstable distribution ("sid") contains more recent versions than testing, but depending on the time you decide to upgrade your system, you may find yourself with broken packages that need to be fixed. Sid is only recommended when you are quite comfortable using the apt system.



[129] KDE is a desktop and set of utilties written entirely in Qt, in contrast to Gnome which is based on Gtk.

[130] The article at http://en.wikipedia.org/wiki/Debian explains this in some detail.