How To Install Zip and Unzip in Linux

In this tutorial, we will show you how to install Zip and Unzip on a Linux system.

Zip is a command-line utility tool used to compress files in Linux. File and folder compression allows for quicker and more reliable file and folder transfer, storage, and email. On the other hand, unzip is a utility tool that helps you decompress files and folders.

The zip format is hugely popular because it can:

  • Compressed/zipped files so that they eat up less disk space.
  • Zipped files are small enough to conveniently transfer over the internet, including uploading, downloading, and attaching them on email.
  • Compress and decompress programs that supports zip format are available on major platforms such as Linux, Windows and macOS.

This article assumes you have at least basic knowledge of Linux, i.e. know how to use the shell. The installation is quite simple, demonstrated using a Linux user with root privileges, so that they can add ‘sudo‘ to the commands to get root privileges. We will show you through the step-by-step installation of the Zip and Unzip packages on Linux.

By default, zip and unzip are not installed in most Linux systems due to licensing restrictions. In this article, we’ll show you how to install zip and unzip in major Linux distributions.

Also check out: How to install HandBrake, Newman, Cisco Webex, vim in Ubuntu and Debian.

Install Zip/Unzip in Linux

Step 1. Update the system

Before doing anything else, the very first step you need to do is ensure that your system are up-to-date by running the following commands in the terminal.

For CentOS/Fedora/RHEL

sudo dnf update

For Ubuntu/Debian-based distro (Linux Mint, Pop! OS)

sudo apt update

For Arch/Manjaro distro

sudo pacman -S zip sudo pacman -S unzip

Step 2. Installing zip/unzip using package managers.

Debian-based distributions use apt as their default package manager. So if you’re running either Debian, Ubuntu or Linux Mint, run the following commands to install the zip utility:

sudo apt install zip sudo apt install unzip

Sit back and wait a minute, until the installation is finished. The first line installs the zip package while the latter fetches the unzip utility for decompression. Once the installation completes, you can confirm the version number of zip using the command below.

zip -v

For CentOS/Fedora system, install the zip with dnf package manager by running the command:

sudo dnf install zip sudo dnf install unzip

For Arch-based distros which use pacman package manager, run the following command to install zip and unzip:

sudo pacman -S zip sudo pacman -S unzip

The syntax for zipping a folder includes -r flag, which stands for recursive:

zip -r folder_name
Code language: CSS (css)

The syntax for unzipping a file is even simpler, just run unzip followed by the filename to decompress it.

Code language: CSS (css)

We hope that the information above helped you successfully install zip and unzip on your Linux system. We’ve also covered other software installation for Linux, especifically Debian and Ubuntu, such as how to install Discord and Chromium in case you’re interested.

If you have any suggestion, please feel free to leave a comment below.

Leave a Comment