How to Zip and Unzip Files and Folders in Linux using the commands?

In this tutorial we are going to learn how we can zip or unzip the file or the folder in Linux.

Here are some steps bellow:-

Prerequisite: Verify if zip is installed

First, we need to verify the zip and unzip command is install or not. to check that we need to run the bellow command.

sudo apt install zip unzip

Let’s Zip the file and folder now.

Go to the parent Folder.

cd Desktop

zip -r demo.zip demo

Zip the file and folder

Let’s Unzip the folder

unzip demo.zip -d demo

Unzip the folder

unzip File_Name.zip -d Destination_Folder