≡ Menu

cheat sheet

Linux Install an RPM File

I'm a new Linux system administrator and wanted to perform software installation and maintenance. I've downloaded a file called awstats.i386.rpm and how do I install it under CentOS / RHEL / Suse / Fedora / Redhat Linux?
[click to continue…]

Unpacking or uncompressing gz files under Linux and UNIX systems

Q. How do I open or uncompress .gz extension file under Linux or UNIX computer?

A. The .gz file extension are created using Gzip program which reduces the size of the named files using Lempel-Ziv coding (LZ77). gunzip / gzip is software application used for file compression. gzip is short for GNU zip; the program is a free software replacement for the compress program used in early Unix systems.

Each file is replaced by one with the extension .gz, while keeping the same ownership modes, access and modification times.

To expand i.e. to Unpacking or uncompressing gz files you need to use gunzip program Or gzip -d or zcat program:

Using gunzip command:
$ gunzip file.gz
$ ls file

Using gzip -d command:
$ gzip -d file.gz
$ ls file

If file extension is tar.gz, type the command:
$ tar -zxvf file.tar.gz
Please note that gunzip can currently decompress files created by gzip, zip, compress, compress -H or pack programs.

See also:

How do I install or upgrade an RPM file or package under Red Hat / Fedora / Suse Linux?

Q. How can I install or upgrade an RPM package under CentOS / RHEL / Fedora / Suse Linux?

A. To install or upgrade an rpm file or package you need to use rpm command. RPM is a RPM Package Manager (originally called Red Hat Package Manager). Both Novell Suse Linux and Red Hat Linux support (Fedora Linux) uses rpm.

To install an rpm you need to use following command (you must be a root user i.e. login as a root user):# rpm -ivh package.rpmTo upgrade an rpm package you need to use rpm command as follows:# rpm -Uvh package.rpmRed Hat enterprise Linux user can use up2date command to install or update package over Internet:# up2date -i package-nameFedora Linux user, use yum command to install or update package over Internet:# yum install packageFedora Linux Update package: # yum update package

See also: