How to zip a folder in Ubuntu/Debian
Many times we find ourselves wanting to zip up a folder or folders to send somewhere/upload to our website, or something. Well how do we do this? Especially since I don’t have a GUI since I am on a vps/server/home lab?
zip and unzip are your friends! For some reason many distros do not come preinstalled with zip or unzip, so lets get started.
Please ssh into your vps. Then we are going to install the zip and unzip packages.
sudo apt install zip unzip

So now how do we use this?
zip -r filename.zip folder
zip -r filename.zip folder1 folder2
zip -r filename.zip /path/to/folder1 /path/to/file2
To create compressed archive named data.zip of data folder in the current directory, run:
zip -r data.zip data/
Verify the file with the ls command.
ls -l data.zip
You can also encrypt data.zip with a password by adding the -e flag.
zip -r -e data.zip data/
Enter password:
Verify password:
adding: data/ (stored 0%)
adding: data/music/ (stored 0%)
adding: data/nightmare.jpg (deflated 2%)
adding: data/resolv.conf (deflated 16%)
adding: data/network.jpg (deflated 0%)
adding: data/acct/ (stored 0%)
adding: data/acct/MSR-201711.PDF (deflated 4%)
adding: data/acct/0XL72233P04252837.pdf (deflated 32%)
Unzipping files in Ubuntu/Debian – Well Linux in general.
To extract all files/directories/folder from given archives into the current directory:
unzip file.zip
unzip foo.zip bar.zip
You can extract files/directories/folders from archives to a specific directory path. For example, extract files into the /tmp/ directory:
unzip file.zip -d /tmp
Want to list the contents of a specific archive without extracting them?
unzip -l archive.zip
Source: https://www.cyberciti.biz/faq/how-to-zip-a-folder-in-ubuntu-linux/