Debian Installation and Configuration

This article only sums up some basic info about Debian installation because the installation itself is usually very easy. This how-to covers only basic text-mode server installation using text-mode installer (the default).

Created
2015
Updated
June 30, 2016

Before Installation

We need to decide which version we need. The current stable version (2015) is Debian 8 Jessie. Because Debian wants to be as stable as possible, the packages are usually very old, only with security fixes.

Some info on versions can be found on Debian's Wiki. Here's a list of supported releases (2015).

New packages are usually put into experimental repository, then they proceed to unstable repository and then to testing. From time to time testing repository is frozen and after few months it becomes stable and current stable repo becomes oldstable.

If you choose a repository by its name (e.g. Jessie) then you are stick to Debian 8 Jessie (starts as testing and ends as oldstable). But if you choose stable instead of Jessie, you always have stable release installed no matter what version it currently is.

Download

Download from https://www.debian.org/ and burn to CD or flash drive (e.g. by using dd command). Stable and testing images can be downloaded directly, Sid can be only upgraded to. This how-to covers basic text-mode stable branch of Debian installation without GUI (e.g. server).

Install Debian Stable

Stable branch of Debian is easy to install. If you want to reinstall, select manual partitioning and set mount points for existing partitions.

My advice is to run installation in text mode. During installation, do not fill root password, the user will be automatically added to the sudo group (unless you need to use root account).

Install Debian Testing or Sid

There are two ways of installing testing branch of Debian:

Install Debian 8 Stable and Then Upgrade

Download Debian stable and install it. During installation, in tasksel menu select only the last option called "standard system utilities".

After Debian stable is successfully installed, we will upgrade to Debian testing. Change jessie to stretch (or testing) in /etc/apt/sources.list. Then run upgrade.

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade

If you want to upgrade to Debian Sid (unstable), then repeat the same process again replacing stretch with sid (or unstable) in /etc/apt/sources.list

After successful upgrade, we need to select system components (which we skipped at the beginning) to be installed.

$ sudo tasksel

Install Debian Testing Directly

Download Debian Testing ISO (regenerated weekly) from Debian website.

Post-Installation

Some configuration and tweaks.

Configure Network

To set static IP, edit /etc/network/interfaces and /etc/resolv.conf files according to Debian Wiki

Install Updates

Remove CD/DVD source from /etc/apt/sources.list (doesn't apply to network installation, it's disabled automatically there). You can also add contrib and non-free after main.

To update system, run the following commands.

$ sudo apt-get update
$ sudo apt-get dist-upgrade

Install Packages

To install a package, update repository information and then install the package.

$ sudo apt-get update
$ sudo apt-get install PACKAGE

Use the following command to list all manually installed packages (includes system pre-installed).

$ apt-mark showmanual

Here are some useful packages.