Home Learn Linux Linux Tutorials Return to Root: How to Get Started With Debian

Return to Root: How to Get Started With Debian

Ubuntu, Mint, and other glamorous Debian derivatives get all the attention. So why not go to the source and try Debian itself?

Debian is currently the most influential Linux distribution. It has inspired the popular derivatives Ubuntu and Knoppix, and their derivatives including Mint, Kubuntu, Dream Studio, Bodhi, Mepis, Damn Small Linux, and Mythbuntu. (See the Linux family tree on Wikipedia.) Debian is volunteer-driven, includes more packages than any other distribution, supports more hardware architectures, supports multiple kernels (Linux, FreeBSD, and GNU Hurd) and is 100% Free. It is also free of cost, and the good Debian people came up with a simple, elegant way to meet the needs of users who want to install non-Free software on their Debian systems. They put non-Free packages in separate repositories, so controlling what goes on your system is super easy.

Debian desktop

Controlling Debian Versions

Debian comes in three flavors: Stable, Testing, and Unstable. Packages start out in Unstable, and migrate down through Testing and Stable. Stable is great for servers because it is thoroughly tested and gets swift security updates. Testing and Unstable are great for desktop systems because they have newer packages. Unstable really isn't unstable, but works fine for a desktop system. The downside is irregular security updates, so you don't want to use Testing or Unstable on servers. There is also an Experimental repository, which contains bleeding-edge packages still under development. (See the DebianGNU/Linux FAQ for more information.)

Debian also has codenames for each version, and these names come from the Toy Story movies. The current stable release is Squeeze, and the current Testing release is Wheezy. Unstable is always Sid, the bratty kid who breaks things. There is a bit of a gotcha you need to watch out for, because when you configure your software repositories you'll get different results depending on which naming convention you use. If you use the Stable/Testing/Unstable codenames then your packages will come from the latest releases of each one. If you use the Toy Story names then you will stay within those specific releases, like the current Squeeze and Wheezy. So if you want to keep Squeeze or Wheezy, then you need to specify Squeeze or Wheezy.

Your Debian repos are configured in /etc/apt/sources.list. Here is a simple example I'm using on my Debian Squeeze system:

deb squeeze main contrib non-free
deb-src squeeze main contrib non-free
deb squeeze/updates main
deb-src squeeze/updates main
# squeeze-updates, previously known as 'volatile'
deb squeeze-updates main contrib non-free
deb-src squeeze-updates main contrib non-free

If I wanted to always be in the latest Stable release, then I would replace "squeeze" with "stable" in sources.list. (See for more information.) This example was generated automatically at installation, and I made one post-installation change, which was adding "contrib non-free". The contrib and non-free repos include non-free and third-party software, such as Adobe Flash and the Nvidia binary graphics driver. We'll walk through the excellent, easy Debian way of installing these in a moment.

Installing Debian

Installing Debian is similar to any Linux distro: download an installation image, copy it to a CD, DVD, or USB stick, boot to the installation medium and away you go. You can also purchase installation disks for a few bucks. There are multiple installation methods: netinstall, a complete installation image, and a live DVD/USB image with a hard disk installation option. The netinstall is a 168MB image that boots your system, sets up the installer, and then you select and download only the packages you want to install. The Debian installation manual is exhaustively thorough, and I recommend that even experienced Debian users take a look at it because it is so detailed. The Debian installer is a powerhouse cram-full of options so you can micro-manage the whole process, or you can elect an automatic installation and let Debian make the decisions for you. It's not a completely hands-off process, so you'll need to stick around to answer a few questions.

Debian does not create an all-powerful sudo user at installation the way Ubuntu and Mint do, but rather sticks to the traditional root user/unprivileged user scheme. If you like the Ubuntu/Mint way, here is how to create it on Debian. First change to the root user, and then run the special visudo editor:

$ su
# visudo

Then add these lines to the sudoers configuration file:

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

Save and close the file, and then add your user to the sudo group in /etc/group. Log out and log back in, and you are now an all-powerful sudo user.

Maintaining Debian

A well-maintained Debian system can run forever without ever needing to be re-installed. For maintaining your Debian system I recommend the excellent Synaptic graphical package manager. If you prefer the command-line then you want apt-get and dpkg, and there are dozens of excellent cheatsheets for these all over the Web. Here is your handy cheatsheet for common operations:

Update your package lists:

# apt-get update

Upgrade all packages to their latest versions:

# apt-get upgrade

Search for a particular package, for example the Tux Racer game:

$ apt-cache search tuxracer

Install a package, like Tux Racer:

# apt-get install extremetuxracer

Remove a package:

# apt-get remove extremetuxracer

Remove a package and its configuration files:

# apt-get remove --purge extremetuxracer

Tux racerIs this package installed?

$ dpkg -l | grep extremetuxracer

Get information on packages that are not installed:

$ apt-cache show extremetuxracer

What files are in this installed package?

$ dpkg -L extremetuxracer

What packages does this file belong to, for example testparm?

$ dpkg -S testparm

Figure 2: Tux Racer

Another good way to search for packages and get information on them is to go to, which gives you multiple ways to search different releases, package names, and file names.

Installing Nvidia Driver

The Debian way of installing the Nvidia graphics driver builds it from sources, so it is exactly matched to your kernel, which means it's more stable and reliable. Make sure you have the contrib and non-free repos enabled in sources.list. The run these commands, as root, exactly as shown:

# apt-get update && apt-get upgrade
# apt-get install module-assistant nvidia-kernel-common
# m-a auto-install nvidia-kernel${VERSION}-source
# apt-get install nvidia-glx${VERSION}
# apt-get install nvidia-xconfig

This will install the necessary kernel headers, source code, and build tools, and generate an /etc/X11/xorg.conf file. Reboot, and your new Nvidia driver will replace the default Nouveau driver. (See Non-free drivers for additional help.)

Adobe Flash

Adobe Flash is a great example of how not to maintain an essential plugin; you'd think a big company with truckloads of money could do better. Sadly, we're stuck with it because there are no good alternatives. Debian eases the pain with its Flash plugin installer. Make sure you have the Contrib repo enabled, then install it:

# apt-get install flashplugin-nonfree

Then run it:

# update-flashplugin-nonfree --install

And that should take care of all the major Web browsers on your system.

Debian Reference

The Debian reference is the exhaustive Debian how-to -- there are no mysteries in Debian.



Subscribe to Comments Feed
  • Paul Sams Said:

    I tend to stay with stable, but use backports and/or I've noticed more and more people say unstable is misleading. I think in the past when I tried to track testing I probably should have tracked Sid. But I'm still biased toward stable. No matter what I try, I always return to Debian.

  • Fred Said:

    I tried Wheezy a couple of weeks ago. It would not use my existing ext4 partition so I changed it to ext3. I told it NOT to install Grub, but it overwrote my Chakra Grub2 theme and renamed my swap partition UUID. I also had to compile my proprietary wireless driver and it degraded my graphics because of the free Radeon driver. Okay I understand the free software and can deal with it, but it takes a bit of work and most folks will ask why? When other distros just make it too easy.

  • Ana Said:

    Hi Carla. Nice article! I mentioned it in the *unofficial* Debian Google+ page. As said there, there is a small mistake: packages uploaded to experimental don't migrate to unstable! Usual debian flow is uploading packages to unstable. Only in some cases packages are uploaed to experimental for testing but they never will migrate from there.

  • Carla Schroder Said:

    Thanks for the correction, Ana!

  • catafest Said:

    Nice article for beginners. I like to see one article about config linux like workstation and integration with internet service providers. I think can give some goals to the users. Also some selinux skills can help us. Thank you. Regards.

  • Robert Said:

    Carla, instead of using module assistant for Nvidia binaries, it is very simple to use 'apt-get install nvidia-kernel-dkms' or the listed legacy options. This will pull the required dependencies and also build the nvidia.ko module automatically for future kernel upgrades. :)

  • tom Said:

    Yes dkms is the way to handle nvidia these days....module assistant is long dead...the wiki needs updating.

  • Ridgeland Said:

    I've been to annoyed that Firefox is not included. I'm not going to explain to the users I support that Iceweasel is almost the same, except some favorite add-ons don't work. So it's still Ubuntu 12.04 here. I've been trying Wheezy RC1 this past week and have Firefox 19 working. I'm optimistic that I can switch to Xfce-Wheezy when it goes stable and then switch other users.

  • James Said:

    Iceweasel _is_ firefox. It's not almost the same, it is the same. The only reason it has a different name is the name Firefox. going with the mozilla backports, you can get the latest Firefox and no incompatibilities exist between the two. (The only difference would be versions.) So, in short, it's Firefox under the hood... so there's nothing to worry about with compatibility.

  • Adam Cooper Said:

    Thanks for this great article. I've just gotten started with Ubuntu and am dabbling with Debian on a VM, with the intention of migrating to Debian as my primary system. This is a great help.

  • Ridgeland Said:

    So about a day to get Firefox to work, a half day to learn how to get auto-login to work. Only an hour or so to get Thunderbird to work, another hour to get VirtualBox working. A day lost trying to get Adobe reader to work. So now I'm testing 32 bit since 64 bit was hopeless for acroread. I'm learning the hard way why Ubuntu is so much more popular. I'm giving up on Debian and going with Xubuntu. Seems if you're not a purist the way to use Debian is via Mint.

  • spuffler Said:

    Been to each major distro, once Kubuntu got big, I landed there and liked what I saw. After a hardware issue (broadcom, fwcutter, etc) forced me out of kubuntu, I tried PCLinuxOS. That held me until I got a different system, and I returned to Kubuntu. From here, I'd like to return to Debian, which initially failed me about 8 years ago. This tutorial will get converted to text, so I can actually view it in a basic Debian install... I still have broadcom as my network device, last I tried Debian (6.x) on this box, I needed to get the drivers from online repo's... cant get online with no drivers. Unless someone here knows the broadcom stuff is on the cd, in the non-free repos?

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board