How To Unzip Files in Linux

There are several ways unzip files in linux. I recommend using the “zip” function to compress your files for ease of use and portability. (Files compressed in Unix can be extracted using various tools on different platforms, including Windows).

Below I provided various methods of “how to unzip files in linux”. The Unzip files in linux  depends on the method used for the zip file. You can specify the method of zip file extension (for example, .zip, .tar, .gz, etc.).

You can also Read:

How To Unzip Files in Linux

Note that the unpacking method that you use is determined by the name of the file that you are trying to unzip. For example, if you are trying to unzip a file named file.tar, you should use the method described in “tar“. Files ending in .gzip or .gz should be extracted using the method described in “gunzip“.

  1. Zip File:

    If you have an archive named myzip.zip and you want to nzip files in linux, you must enter:

    Unzip myzip.zip

    Entering zip or unzip itself will give you a brief description of the usage, displaying almost all available options.
  2. Tar:

    To extract a tar-compressed file (for example, filename.tar), enter the following command from the SSH prompt:

    tar xvf filename.tar 

    Basically, this command means that you will see that the file “explodes”, so do not worry when you see that your screen scrolls wildly. It also means that you will see errors in the archive.

  3. Gunzip:

    To extract a file compressed with gunzip, enter the following:

      Gunzip filename_tar.gz 

    then, if you did not get errors, type:

      tar xvf filename_tar 

Leave a Reply

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