Let us see How to zip a folder in Ubuntu Linux. The zip is a compression and file packaging utility for Linux and Unix command. In this blog post we will learn to compress a folder on Ubuntu Linux using Linux terminal and using GUI utility.

How to zip a folder in Ubuntu Linux using terminal

Open the Linux terminal and type the following command:
$ sudo apt install zip unzip

This command will install zip and unzip utility to system.

The syntax of compression of folder into zip archive is as below.

zip -r sampe.zip sample

  • sample is folder name
  • sample.zip is the compressed file name.
  • The switch -r , tells zip to recursively add all files and sub-folders to the zipped file.

How to zip a folder in Ubuntu Linux

How to unzip a zipped compressed file.

bosch@bosch-Inspiron-N5050:~/Desktop$ unzip sample.zip

Compress a folder on Ubuntu Linux using GUI utility

  • Right click on the folder to zip.
  • Select compress option, a dialog box would be open.
  • Select zip and press ok on dialog box.

 




Related Contents to follow