Command-Line Zip – How to Unzip a Zip File from the Terminal

command linezip

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?

Best Answer

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