Zip is a command-line tool for compressing files and folders. Compression makes transferring and storing data faster and easier, and it’s handy for emailing. Unzip does the opposite—it extracts archives.
— Save space. Archives take up less disk space, leaving you more room to work.
— Faster transfers. Zipped files upload, download, and attach to emails more quickly.
— Cross-platform. ZIP files open on Linux, Windows, and macOS.
This guide shows how to install zip and unzip on popular Linux distributions and which commands to try first.
Install zip:
sudo apt install zip
Check the version:
zip -v
Install unzip:
sudo apt install unzip
Check the version:
unzip -v
Install zip:
sudo dnf install zip
Install unzip:
sudo dnf install unzip
Install zip:
sudo pacman -S zip
Install unzip:
sudo pacman -S unzip
Install zip:
sudo zypper install zip
Install unzip:
sudo zypper install unzip
Once installed, you can start compressing and extracting files right away.
Create a ZIP archive:
zip archive.zip file1 file2 file3
Extract an archive:
unzip archive.zip
List the contents without extracting:
unzip -l archive.zip
— zip: command not found or unzip: command not found. The tools aren’t installed. Install them using the steps above for your distro.
— permission denied while zipping/unzipping. You don’t have access to the directory or files. Run the command with sudo or switch to a directory you own.
— End-of-central-directory signature not found. The archive is corrupted or incomplete. Download it again or ask the sender to recompress it.
On newer releases of some distributions (for example, Ubuntu and RHEL), zip and unzip may already be installed. We covered how to install them on popular systems, how to check they’re present, and the basic commands you’ll use. With these tools, compressing and extracting files is simple, fast, and works across platforms.