@manish
Linux Oct 06, 2026

how to unzip a file from the linux terminal

on ubuntu over ssh, no desktop. got a zip file i need to extract into a specific folder. what's the command?
2

Leave A Reply

Log in to post an answer.

2 Answers

ella_tech Oct 29, 2026
manish
If unzip throws an error about an unsupported compression method, the zip was probably made with AES encryption or a newer method, which the standard unzip can't handle. Install p7zip (sudo apt install p7zip-full) and use 7z x file.zip instead. unzip -o also skips the "replace? [y]es, [n]o" prompt for every file, which is a lifesaver on big archives.
sakshi87 Oct 09, 2026
manish
unzip file.zip that extracts into the folder you're in. to send it somewhere else: unzip file.zip -d foldername. unzip -l file.zip lists what's inside without extracting. if it says command not found, it's not installed. on ubuntu/debian that's sudo apt install unzip. and if the file is actually a .tar.gz, it's tar -xzf file.tar.gz instead.