How To Install Gzip?

How To Install Gzip?

gzip

Compress/uncompress files with gzip compression (LZ77).

Maintainer: Bdale Garbee



Section: utils

Install gzip

  • Debian apt-get install gzip Click to copy
  • Ubuntu apt-get install gzip Click to copy
  • Alpine OS apk add gzip Click to copy
  • Arch Linux pacman -S gzip Click to copy
  • Kali Linux apt-get install gzip Click to copy
  • CentOS yum install gzip Click to copy
  • Fedora dnf install gzip Click to copy
  • Raspbian apt-get install gzip Click to copy
  • macOS brew install gzip Click to copy

Compress/uncompress files with gzip compression (LZ77).

How to use gzip?

Below are few example commands for gzip that you can use in the terminal.

Compress a file, replacing it with a gzipped compressed version:
gzip file.extClick to copy
Decompress a file, replacing it with the original uncompressed version:
gzip -d file.ext.gzClick to copy
Compress a file specifying the output filename:
gzip -c file.ext > compressed_file.ext.gzClick to copy
Uncompress a gzipped file specifying the output filename:
gzip -c -d file.ext.gz > uncompressed_file.extClick to copy
Specify the compression level. 1=Fastest (Worst), 9=Slowest (Best), Default level is 6:
gzip -9 -c file.ext > compressed_file.ext.gzClick to copy
To install the latest version of gzip in your favorite operating system just copy the gzip installation command from above and paste it into terminal. It will download and install the latest version of gzip 2026 package in your OS.