Create Zip File in Linux

Last updated on Dec 28, 2019 in Linux

Zip is a compression method and utility program in Linux. You can compress single files and folders with it. This tutorial is about to zip a single file. To zip an entire folder, check article Create Zip File From Folder Recursively in Linux.

Let’s assume that your file is name myfile.txt. In Linux terminal, type:

$ zip myfile.txt

This will create a zip file in the same folder.

You can also add multiple files to the same zip file:

$ zip myfile.txt another.txt another2.txt

To see contents of a zip file, check this article: See List of Files in Zip in Linux.