Tag/tag.png

Duplicate Article
This article covers the same material as another article. More info...

This page duplicates material in InstallingSoftware and CompilingEasyHowTo, other material should be integrated elsewhere and the page marked for deletion.

Software packaging formats in Linux

This document summarizes major Linux software packaging formats.

Introduction

This guide is written for Ubuntu users that would like to learn more about common Linux packaging formats. This guide is not all-inclusive, it merely covers common formats likely to be encountered by average users. For information on installing software see the additional resources at the end of the article.

Formats

Linux uses some common formats to distribute software. The most common formats for the average Ubuntu user are:

  1. Debian Packages (.deb)
  2. Tarballs
  3. Red Hat packages (.RPM)

Debian packages (.deb)

Debian Packages are the most common format you will encounter when installing software in Ubuntu. This is the standard software packaging format used by Debian and Debian derivatives. All of the software in the Ubuntu repositories is packaged in this format. Synaptic Package Manager, Add/Remove Applications, Aptitude, and apt-get handle the transaction with the repository behind the scenes.

Tarballs

Tarballs are a large collection of files assembled into a single archive file. The "tar" command is used to combine many files into a single file for archiving or easy distribution. The "gzip" command is used to compress the size of a file so that it takes up less space. A tarball is very similar to a .zip file on Windows, or a .hqx, .sit, or .dmg file on Macs.

Tarballs have extensions like ".tar.gz", ".tar.bz2" or "TGZ". Most of the time, a tarball contains source files and/or binary files. In the open source community, they are used to distribute source code. If you find any software with a .tar.gz appendix, you will need to uncompress it by double clicking on it before installing the software it contains. To do the same thing from a terminal window, you can also use the tar command like this: tar -xzf name_of_file

Source files

Source files are nothing but raw code which requires compilation to work, while binary files are like .exe files which are ready to install.

See also FileCompression.

Binary files

RPMs

The Red hat Package Manager or .RPM format is specifically designed for easy installation and management of software packages. The format allows you to automatically install, upgrade and remove software packages. It tracks dependencies -- situations where one package requires another package in order to work correctly -- and will not install software if it depends on another package which is not installed.

To convert RPM packages to Debian's package format you can use the alien command. A warning for novice users: don't use the alien method; if there are .deb packages available you should use them, since using a package designed for another distribution might inadvertently damage or destabilize your system.

Additional resources

SoftwarePackagingFormats (last edited 2011-05-10 21:16:17 by jengelh)