How to zip a directory/folder in Linux ? zip Command

You can use “zip” command to compress all files in a directory to a zip file. Zip has a -r (recursive) option to zip entire directory trees.

Syntax:

zip -r <filename> <directory you want to zip>

Example:

zip -r images.zip photos