How to create a zip file on Ubuntu

I know how to use tarcommand to compress files but it will compress file in either gzip or bzip format. Now, I want to compress in ZIP format so it can be extract on my friend computer that is running Windows. How could I do that?

Asked 2 years ago ago

Zip is not available on Ubuntu out of the box. You need to Install zip first:

$ sudo apt-get install zip

Then to compress file in zip format run the following command:

$ zip -r big_folder.zip big_folder

Notice in the above command the name of zip file that will be created comes before the name of the folder that you want to compress from.

Answered 2 years ago ago

Write Answer: