Celeb Glow
general | March 03, 2026

Substitute for zip command or way to zip files

I want to zip files using the zip command, but my terminal says

-bash: zip: command not found

Is there a way to get the zip command, or maybe use another command instead?

3 Answers

You need to install zip, with Ubuntu or Debian :

sudo apt-get install zip

If you don't have access to install zip, you can try tar instead to see if it's available.

Example to "zip" a directory:

tar -czf myfolder.tar.gz myfolder

It is possible you already have zip installed but it is not in PATH.

To add folder with 'zip to PATH, run the command below in the terminal.

PATH=/usr/bin/ls:$PATH

This works for MacOS

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy