Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

How to unzip a zip file from the Terminal?

Just downloaded a .zip file from the internet. I want to use the terminal to unzip the file. What is the correct way to do this?
by

2 Answers

akshay1995
If the unzip command isn't already installed on your system, then run:

sudo apt-get install unzip

After installing the unzip utility, if you want to extract to a particular destination folder, you can use:

unzip file.zip -d destination_folder

If the source and destination directories are the same, you can simply do:

unzip file.zip
sandhya6gczb
A more useful tool is 7z, which zips and unzips a range of compression formats, notably lzma, usually the protocol offering the highest compression rates.

This command installs 7z:

sudo apt-get install p7zip-full

This command lists the contents of the zip:

7z l zipfile.zip

This command extracts the contents of the zip:

7z x zipfile.zip

Login / Signup to Answer the Question.