Zip and UnZip Command for Ubuntu With Example

Install Zip and Unzip for Ubuntu

First Update repositories for the system.

sudo apt-get update

Install zip and unzip on our system using below command

sudo apt-get install zip
sudo apt-get install unzip

Zip the Directory/Folder

zip -r filename.zip directory_you_want_to_zip

Unzip / Extract the .zip file

If you want to unzip/extract the .zip file in current directory then use below command

sudo unzip filename.zip

If you want to unzip/extract the .zip file in different directory then below command need to use.

sudo unzip path/to/filename.zip -d /path/to/another/directory

Leave a Reply

Your email address will not be published. Required fields are marked *