The zip utility creates ZIP archives, while unzip lists and extracts them. Install the tools appropriate to your Linux distribution when they are not already available.
Check and install the utilities
Check for existing commands:
command -v zip
command -v unzipOn a server you administer running Debian or Ubuntu:
sudo apt update
sudo apt install zip unzipOn supported Fedora or RHEL-family systems using DNF:
sudo dnf install zip unzipOlder supported installations may use yum. Shared-hosting users should ask the provider for missing tools rather than attempting system installations.
Verify the installation
Run:
zip -v
unzip -vCreate or inspect an archive
For example, archive a selected project directory:
zip -r project-backup.zip project/Check an archive before extraction:
unzip -l project-backup.zipExtract into a fresh, private directory and check for existing files before allowing overwrites. A ZIP archive is not automatically an encrypted backup, and compression may save little space for already compressed files.