Installing Applications with Debian’s deb Packages

Every Linux distribution has its own way of packaging the software. As an example, Red Hat uses rpm packages to install software and Debian based Linux distributions use deb based packages to install software. Although both rpm and deb seem to be bit complicated when you first hear it, but actually they both are files containing software. These are no different than well known zip files that bundle other types of files.

Debian’s deb Packages

Windows use exe or msi packages to install software. Debian uses deb for installing software. It’s quite simply that way right? So now let’s have a look at how Debian uses deb for installation and what does a deb package contain.

First of all, there are two ways of installing software in Linux; one by compiling the source code and other by installing the binary. When it comes to deb packages, it is all binary. A precompiled set of binaries will be installed in your Debian based system through deb packages.

When it comes to understanding the deb packages, it is important to understand their structure. A deb packages includes two sub packages archived in usual UNIX archives such as gzip, izmaed, or bzip. One of the two sub packages contains the control information of the installation and other contains the data (files) to be installed. When the installation takes place, the Debian system uses control information inorder to properly copy and installs the content in the data package.

In order to properly install deb packages in Debian based systems, the system should have a tool to handle the packages. As an example, Ubuntu uses ‘dpkg’ as the deb package handing tool. The other distributions based on Debian do have their own tools for the same purpose.

In case if someone wants to install a deb package in other systems based on rpm or any other type of package management? Yes, deb is flexible for that as well. Users who have this need can easily use a couple of third party software such as alien to convert deb to other types of packages and directly install them on other systems. This is usually not possible or difficult in other systems based on non-deb packages.

Deb packages has its small cousin; udeb. Udeb is the micro version of deb packages and usually used only for bootstrapping the Debian based systems. Although udeb extension is used by these micro packages, they follow the same structure and set of rules as deb packages. The main difference between deb and udeb is that udeb usually omits non-essential files such as documentation and language files. Udeb packages are not installable in standard Debian based system. Like I said, it is just for bootstrapping.

Sometimes, you might develop a new software program for Linux and may want that to be distributed for other’s use. In such case, you have two options; either you can distribute the source code with compilation instructions (which is the hard way for most of the regular users) or as a binary package such as deb or rpm. If you choose the latter method (assuming its deb), you will have to create your own deb package. For this, you can get a lot of information and instructions from the web. There are many tutorials on how to compile a deb package to distribute your software program. In case if you are thinking of adding your software program to standard package repository, then there is a different process to follow. You will need to submit your software program for review and upon the authorization; you will be able to submit it to the repository where anyone can install it through standard package management software.

Author: Nilanka

Comments

comments

Leave a Reply