October 25, 2014
 
 
RSSRSS feed

Linux Package Management: Keeping Up with the Times - page 4

Introduction to Package Types

  • April 22, 2002
  • By Dee-Ann LeBlanc

The basic package management unit in the Linux world is the tarball (which is in fact still the tool of choice in distributions such as Slackware). I use the term package management loosely here. What sets RPM and DEB apart from a tarball is that a tarball contains just the package and what it needs to function, while an RPM or DEB includes fancy setup widgets, and databased information about the package installed, their components, and more.

A tarball is made up of two separate components. The inner wrapper contains the tar portion of the package, which contains files, directories, the requisite permissions, and more, unless you specified otherwise. A good read through man tar is quite educational. In its basic form, we usually utilize tar in two different ways. Mostly it's to extract the contents of the archive in a format similar to:

tar xvf file.tar

The x is the key, for eXtract, the v gives verbose output and shows you where everything's going, and the f says you're specifying the file name. There are a number of flags you might want to use when creating an archive, but a good basic approach typically involves:

tar cvf file.tar items_to_archive with spaces /in/between

To then compress the archive, since it's probably huge, you just type:

gzip file.tar

The resulting file is file.tar.gz. A great shortcut is:

tar zcvf file.tgz items_to_archive with spaces /in/between

The z compresses the package automatically once it's been created.

Sitemap | Contact Us