Linux downloads come in a variety of formats which can be confusing to newcomers. Terms such as "tarballs" or "rpm's" can be difficult to understand. And even after unpacking the download, it is important to know if the file is a .rpm or a .src.rpm or some other format.
A "tarball" or a .tar file is simply a compressed archive containing several
files. Its format would be "filename.tar" A .tar file can be further
compressed using "gzip" or "bzip2". A tar file compressed using gzip would
be in "filename.tar.gz" format. A similar archive would be .tgz format. If
compressed using bzip2, it would be a .tar.bz2 format. A .tar
file can be uncompressed using the command tar -xfv filename.tar.
You can then "cd" to the directory created "cd filename" and you
should file a file named README and another called INSTALL. These should
contain directions on installing and using the downloaded program, Generally,
If the file is in "filename.tar.bz2" format, first uncompress it with the "bunzip2 filename.tar.bz2" After that, the directions are the same as for any other .tar file.
|Create a .tar file||tar -cvf filename.tar filename|
|Unbundle a .tar file||tar -xvf filename.tar|
|List contents of a .tar file||tar -tf filename.tar|
|List Contents of a .tar.gz file||tar -ztf filename.tar.gz|
|Create a .tar.gz file||tar -zcvf filename.tar.gz filename|
|Open a .tar.gz or .tgz file||tar -zxvf filename.tgz or filename.tar.gz|
|Create a .gz file||gzip filename.gz filename|
|Uncompress a .gz or .tar.gz file||gunzip filename.gz|
|Zip (works w/ PKZip or WinZip) a file||zip filename.zip filename|
|Uncompress a .zip file||unzip filename.zip|
|Compress a file to .bz2 format||bzip2 filename.bz2 filename|
|Uncompress a .bz2 file||bunzip2filename.bz2|
|Split a file to fit on 1.44 MB Floppies||split -b 1400000 filename|
|Rejoin Split files||cat x* > OriginalFileName|
Most Linux distributions also have a "zip" utility capable of "unzipping" files compressed using Windows' WinZip or PKZip programs. The command is simple unzip filename.zip. To compress a file using this program, the command is zip filename.zip filename where filename is the name of the uncompressed fileand filename.zip is the compressed file.
More commonly, Linux files are compressed using the gzip command and uncompressed using the gunzip commands. This pair of commands is found on most, if not all, Linux distros.
Another common download file type is the .rpm or Red Hat Package Manager format. These files will either be in x86.rpm format or in .src.rpm format. To install a x86.rpm file, it is only necessary to type rpm -Uvh filename.rpm at the command line from the directory the file is located in to upgrade an existing package. To install a new package, the command is rpm -ivh filename.rpm. From there, the Red Hat Package Manager takes over.
If the file is a filename.src.rpm file, it can be installed by using the command rpm --rebuild filename.src.rpm
A RPM file can be said to have 3 parts, the package name,
the version, and a file extension. A typical .rpm file name might be:
somename-1-05-3.i386.rpm. In this example, I would refer to "somename"
as the package and "1-05-3.i386" as the version.
Using this convention, the following table lists a few of the options
available with rpm:
|rpm -ivh package-version.rpm||install new .rpm package|
|rpm -Uvh package-version.rpm||upgrade existing package|
|rpm -qa||list all installed .rpm packages|
|rpm -qi package||get more information on this package|
|rpm -ql package||list all files that package installed on system|
|rpm -e package||remove installed package|
|rpm --rebuild package-version.src.rpm||Install a source rpm|
|rpm --rebuilddb||rebuild the RPM database|
Apt-Get and Synaptic for Red Hat
Apt-get for RPM is a really nice utility for Red Hat users. It allows a Debian-style package update or install. Combined with Synaptic, a GUI front end for apt-get, you have a really slick way of getting updates. The following links will get you everything you need to install and use these programs.