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:
- 1- How To Unzip Files On Windows 7 [Latest Method] Is Here!
- 2- How To Unzip Files Windows 10 – Best Quick Method
- 3- How To Unzip Files On MAC – Quick & Easy Step By Step
- 4- How To Unzip Files On Android – A Quick Method
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“.
If you have an archive named myzip.zip and you want to nzip files in linux, you must enter:
[alert style=”info”]Unzip myzip.zip [/alert]
Entering zip or unzip itself will give you a brief description of the usage, displaying almost all available options.
To extract a tar-compressed file (for example, filename.tar), enter the following command from the SSH prompt:
[alert style=”info”] tar xvf filename.tar [/alert]
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.
To extract a file compressed with gunzip, enter the following:
[alert style=”info”] Gunzip filename_tar.gz [/alert]
then, if you did not get errors, type:
[alert style=”info”] tar xvf filename_tar [/alert]