oio11: (Default)
[personal profile] oio11
15 Mar/13

Minimal Debian Install

Here's my guide to installing a lean Debian desktop. I went through these steps on a Thinkpad X200. Your needs may vary. Skip the parts that don't apply to you. This post will get you from zero to a working desktop. I will cover additional configuration and customization in another post.

Debian Net Install

First, get the net installer here: Debian Install Images. I went with the current Testing version, Wheezy. It should be suitable for most desktop users.
Because this is a net install, make sure you have an ethernet connection. Wireless won't do.
I'm assuming intermediate level experience with Linux in this guide so I won't go through each step of the installation. I'll leave paritioning and all that to you.
Once you get to the "Select and install software" step, select only SSH Server, Laptop Tools, and System Utilities.

Install sudo

If you did not supply a root password, sudo is already set up and you can skip this step. If you did provide a root password, you need to do it yourself. Time to install sudo and add yourself to the sudo group. This is not strictly necessary, but there are many benefits to using sudo over su. Let's say your username is dave.

$ su
# apt-get install sudo
# adduser dave sudo
# exit
Log out and back in again and there we go!

Wireless

This isn't necessary if you don't have a wireless card, naturally.
As for me, this is a laptop, so I need to install wifi drivers. I installed using an ethernet cord but that won't do in the long run.
First, we need to add the non-free Debian repositories. Add these lines to the /etc/apt/sources.list file:

deb http://ftp.us.debian.org/debian/ wheezy main contrib non-free
deb-src http://ftp.us.debian.org/debian/ wheezy main contrib non-free
 
deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free
I wanted to use vim to do so, but it wasn't added. So, I installed vim:

$ sudo apt-get install vim
Once the non-free repo is added, update and install the driver I need. You might need different firmware:

$ sudo apt-get update
$ sudo apt-get install firmware-iwlwifi
Also get the wireless-tools package:

$ sudo apt-get install wireless-tools
So we have the driver, but now we need to use it!
Since the iwlwifi module is automatically loaded for supported devices, we need to reload this module to access installed firmware:

$ sudo modprobe -r iwlwifi ; modprobe iwlwifi
Now we see if the device has an available interface:

$ sudo iwconfig
Yep! Mine is called wlan0
Configuring your wifi can be done now through the terminal using wpa-supplicant, or you can wait until we have a GUI. I'm going to show you how to use wpa-supplicant because it's harder.
Time to use wpa-supplicant (installed with wireless-tools) to connect to my wireless network. Let's setup wlan0 with the SSID and PSK. Edit /etc/network/interfaces and add these lines:

auto wlan0
iface wlan0 inet dhcp
    wpa-ssid YOUR-SSID-HERE
    wpa-psk YOUR-PASSWORD-HERE
Now let's see if it worked.

$ sudo ifup wlan0
$ sudo ifconfig wlan0
$ ping router-ip-here
$ ping google.com
Yep! all good.

Desktop

Okay so installing X is very easy:

$ sudo apt-get install xorg
We could startx now, but that would just give us an xterm. So let's choose a window manager. I'm avoiding full-blown Desktop Environments (such as GNOME or KDE) because this is supposed to be a light-weight install.
My favorite tiling WM is dwm, and my favorite floater is Openbox. I think I'll install them both, as sometimes things work in Openbox and not in dwm (such as screen sharing in Google Hangouts...I dont know why).
First the easy one, Openbox:

$ sudo apt-get install openbox
Because the scripts in /etc/X11/Xsession.d will eventually run x-window-manager, which is presumably set to openbox via the alternatives mechanism (/usr/sbin/update-alternatives --display x-window-manager), at this point you could type

$ startx
And start using Openbox right away, but I'm going to focus on dwm since it's my favorite.
Install your favorite window manager or desktop environment. I like dwm. But, because dwm is configured by modifying the source code and recompiling, it is best not to install it through the repositories (although that is an option if you don't care to change the defaults). The best way to use dwm is by using git, modifying the source, and compiling it yourself. Here's a guide. It can be summarized as the following:
Installing dwm "properly" means downloading the source, modifying it to our liking, and compiling it. This is because dwm doesn't use configuration files or scripts to customize it, the source itself must be changed.
So that means we'll need gcc, et al. If you're a programmer you'd get these things anyway:

$ sudo apt-get install build-essential
dwm requires x11 development libraries, as well as Xinerama development libs (if you want dwm to support mult-monitor). So install those too:

$ sudo apt-get install libx11-dev libxinerama-dev
Now let's get the dwm source code. I'm gonna use git.

$ sudo apt-get install git
And get the source from the suckless git repo:

$ git clone http://git.suckless.org/dwm
That will create a directory called dwm.

$ cd dwm
Now make a copy of the config.def.h file so your configuration doesn't get clobbered if you download the source again:

$ cp config.def.h config.h

Make any changes you want to config.h. I won't go into it here.
And finally, compile and install dwm!


$ make clean install
In order to use dwm, we need to make startx use it. So let's create and modify our ~/.xinitrc

$ vim ~/.xinitrc
And add this line to the end of it:

exec dwm
Done!
Now just run:

$ startx
minimal_dwm
Now we have a desktop.

Sound

Let's install alsa.

$ sudo apt-get install alsa-base alsa-utils
And get it started:

$ alsactl init
And now test it to see if we can actually hear anything:

$ aplay /usr/share/sounds/alsa/*
Should hear a woman's voice saying "Front center" etc.

Something else you might start hearing is an annoying beep. This is called the PC bell. Disable that damned PC bell.

http://linuxforcynics.com/how-to/minimal-debian-install

October 2025

S M T W T F S
   1234
567891011
12131415161718
19202122 232425
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 3rd, 2026 12:56 pm
Powered by Dreamwidth Studios