I just downloaded .zip file from the internet, want to unzip it in Linux, which are the different ways in which I can do this?

ZIP file is one of the most commonly used archive file formats which supports data compression. A ZIP file contains one or more files or directories which are compressed. Zipping the files makes it easier to transfer and share the data online. Also, a zipped file occupies the least amount of storage space making it a better way to organise files. When you are working on a Linux system and you receive a zipped file, extracting the files from it is not as difficult as you may imagine. In this tutorial you can know how you can unzip Linux compressed files in a zipped folder.

Solution 1. Use Tar Command to Unzip A ZIP File in Linux

You can make use of the tar command to unzip zip file Linux. You can do this by following the steps mentioned below.

If you just want to unzip a ZIP file with tar command key in the following command.

tar xvf {file.zip} tar -xvf {file.zip}

When you want to extract the compressed files of a ZIP folder to a particular destination directory, key in the following command.

tar xvf {file.zip} -C /dest/directory/ tar -xvf {file.zip} -C /dest/directory/

For example, take "master.zip" as the file which you wish to unzip and take "/tmp/data/" as the directory where you want to extract the files. Using the tar command the entire session to unzip the file is shown in the below image clearly.

tar command unzip a file

This way you can unzip a ZIP file to the location you want on Linux using the tar command.

Solution 2. Use Unzip Command to Unzip a ZIP File in Linux

The traditional way and the most easiest way to unzip a ZIP file in Linux is by using the unzip command which is given as follows.

Type the following unzip command in Linux for directly unzipping the file on Linux.

unzip {file.zip}

If you wish to extract the files to a particular directory, use the following command.

unzip -d /dest/directory/ {file.zip}

If "master.zip" is the zipped file and you want the files to be extracted to "/tmp/data" directory, the step shown in the session below has to be followed.

unzip command

This way you can use the unzip command to unzip file Linux of a ZIP folder.

Bonus Tips: How to Unlock Password-Protected ZIP on Windows

The above methods can be used when you want to unzip a file in Linux system to a particular directory. If in case you are using a Windows system, the above solutions would prove to be useless. There are a few traditional ways in which you can unzip a file on Windows for free but even those methods fail if the compressed folder in question is password protected. If you are stuck midway with such a password protected compressed folder, you can make use of PassFab for ZIP tool to easily unzip a password protected compressed folder. In order to do this, you will have to follow the steps given below.

  • Step 1: Install PassFab for ZIP tool and launch it on your system.
  • Step 2: Click on "Add" button on the main interface. zip password recovery
  • Step 3: Select the required encrypted compressed folder and click on "Open". import zip
  • Step 4: If you have completely forgotten everything about the password for the compressed folder, select the "Brute Force Attack" option.

    If you do remember a few details about the password, select "Brute Force with Mask Attack". From the "Settings" options, provide all the details which you remember and then click on "OK".

    If you have a dictionary file with the commonly phrased passwords, select "Dictionary Attack". From the "Settings" option select "Add Dictionary".

    three attack mode
  • Step 5: You can copy the password which you got by this program and paste it to open the encrypted compressed file. recover password

This tool provides an easy way to unzip password protected compressed folders on Windows system.

Conclusion

Most of you may have come across Zip files several times. Zipping a file is the most common way of organizing the files in a system in a systematic way to occupy less storage space. Sharing a zip file is much easier when compared to sharing individual files. So, if you have received a zip file and do not know how to extract the contents of it on Linux systems, you can use the two effective methods described above to perform Linux unzip zip file. Now, if you have a Windows system and want to extract a password protected zip file, then PassFab for ZIP is the best zip password recovery way in which you can extract the contents of a zip folder.