How To Install Zip and Unzip on Linux

Install Zip and Unzip on Linux

In this tutorial, we will show you how to install Zip and Unzip on a Linux system. For those of you who didn’t know, Zip is a command-line utility tool used for compressing files and folders. Compression of files & folders enables faster and more efficient transfer, storage, and emailing of files and folders. On the other hand, unzip is a utility tool that helps you decompress files and folders. Both zip and unzip package contains programs to create a compressed file in Linux.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the Zip and Unzip packages on Linux.

Prerequisites

  • A server running one of the following operating systems: Ubuntu, CentOS, and Arch Linux
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • A non-root sudo useror access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install Zip and Unzip on Linux

Step 1. First, make sure that all your system packages are up-to-date by running the following commands in the terminal.

### CentOS/RHEL-based ###

sudo dnf update

### Ubuntu/Debian-based ###

sudo apt update

### Arch/Manjaro ###

sudo pacman -Syu

Step 2. Installing Zip and Unzip on Linux.

  • For Debian-based distributions, install the zip utility by running the command:
sudo apt install zip
sudo apt install unzip
  • For the CentOS system, install the zip utility by running the command:
sudo dnf install zip
sudo dnf install unzip
  • For Arch Linux-based distributions, install the zip utility by running the command:
sudo pacman -S zip
sudo pacman -S unzip

Step 3. How to Unzip a ZIP File in Linux.

After installing the zip utility, you can create a zip file using the following command:

zip -r compressed_filename.zip folder_name

Using unzip command in Linux is simple. You need to tell unzip the name of the zip file which you want to unzip.

unzip compressed_filename.zip -d destination_folder

Congratulations! You have successfully installed Zip and Unzip. Thanks for using this tutorial for installing the Zip and Unzip on your Linux system. For detailed information, you can head to the command’s man page.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!