Unzip File in Linux

Last updated on Dec 28, 2019 in Linux

A file ending .zip is a compressed file created with zip utility found in most Linux distributions. To decompress it, you can unzip the file by typing in Linux terminal:

$ unzip myfile.zip

This will extract the zip file to the same folder. If you want to extract the content to another folder, you can define the target folder as:

$ unzip myfile.zip -d /path/to/folder

Where -d tells the unzip to decompress zip file to the specific folder. Note! The target folder must exist before calling the unzip.

You might first want to view the content before unzipping. Check this article for details: See List of Files in Zip File in Linux