How To Install zip on CentOS 8

zip is A file compression and packaging utility compatible with PKZIP

Introduction

In this tutorial we learn how to install zip on CentOS 8.

What is zip

The zip program is a compression and file packaging utility. Zip is analogous to a combination of the UNIX tar and compress commands and is compatible with PKZIP (a compression and file packaging utility for MS-DOS systems). Install the zip package if you need to compress files using the zip program.

We can use yum or dnf to install zip on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install zip.

Install zip on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install zip using dnf by running the following command:

sudo dnf -y install zip

Install zip on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install zip using yum by running the following command:

sudo yum -y install zip

How To Uninstall zip on CentOS 8

To uninstall only the zip package we can use the following command:

sudo dnf remove zip

zip Package Contents on CentOS 8

/usr/bin/zip
/usr/bin/zipcloak
/usr/bin/zipnote
/usr/bin/zipsplit
/usr/lib/.build-id
/usr/lib/.build-id/30
/usr/lib/.build-id/30/39574f6af2f0d48ce58766c8555bb643411ad0
/usr/lib/.build-id/42
/usr/lib/.build-id/42/d18b9a140bca02bd5d9745e4c6f7f540c84b2c
/usr/lib/.build-id/58
/usr/lib/.build-id/58/aeda0334ff6d0e830270684ecced5ea24f8677
/usr/lib/.build-id/60
/usr/lib/.build-id/60/675c7ee635074c208a291020757ba77ac5cbbd
/usr/share/doc/zip
/usr/share/doc/zip/CHANGES
/usr/share/doc/zip/README
/usr/share/doc/zip/README.CR
/usr/share/doc/zip/TODO
/usr/share/doc/zip/WHATSNEW
/usr/share/doc/zip/WHERE
/usr/share/doc/zip/algorith.txt
/usr/share/licenses/zip
/usr/share/licenses/zip/LICENSE
/usr/share/man/man1/zip.1.gz
/usr/share/man/man1/zipcloak.1.gz
/usr/share/man/man1/zipnote.1.gz
/usr/share/man/man1/zipsplit.1.gz

References

Summary

In this tutorial we learn how to install zip on CentOS 8 using yum and dnf.