Archive for October 2011


There are many classes of applications which have many programs that can be used, Debian allows you to choose which particular alternative you wish to be used, globally. This covers a set of programs such as: text-editor, web-browser, windows-manager, x-session-manager, etc.

The way it works is to have a set of standard command names such as editor, www-browser, and view. Each of those commands are merely symobilic links to the real command.

For example assume you have both the vim and emacs21 packages installed. To handle this a program that wishes to allow you to edit a file merely runs:


This is a symbolic link which links to:


This in turn links to the real editor, either vim or emacs in our example.

So, to set you preferred text-editor, you could update the symbolic links by hand, but the preferred approach is to run:

$update-alternatives --set editor /usr/bin/emacs21

To list which are the options you have:

$update-alternatives --list editor

You can set other applications, replacing editor by: x-www-browser, x-session-manager, etc.


Apt-pinning is one method for allowing packages from different Debian releases to co-exist on the same system.

To use Debian packages on a default release system (stable or testing or unstable or experimental) you should create /etc/apt/apt.conf and set the default release to track:

[root@enterprise ~]# echo "APT::Default-Release "stable";" > /etc/apt/apt.conf

Or you can create /etc/apt/preferences and pin the priority of the different releases:

[root@enterprise ~]# touch /etc/apt/preferences
Package: *
Pin: release a=stable
Pin-Priority: 900

Package: *
Pin: release a=testing
Pin-Priority: 90

  • None
  • analialorenzatto: Buzz is just a host name for this example, it doesn't have any relation to the topic. Instead of being "Buzz", could be whatever name.
  • fridelain: >buzz What's the story behind this host name? Actully running buzz, once running buzz and upgraded many times since, or unrelated to debian naming
  • Pratik: Nice, but I would change it to include more directories. Like my .mozilla and .kde4 by using .{config,mozilla,kde4} instead of just .config .