Extract a zip archive with unzip

Unpack .zip files from the terminal — the format Windows and macOS send you every day.

LinuxZip & ArchivesarchiveLow risk
Run unzip archive.zip -d ./target-dir to extract into a folder, or unzip -l archive.zip to list contents first.

01Command

Command
$ unzip photos.zip -d ./photos && unzip -l archive.zip

02What it does

unzip is the standard extractor for zip files received from other operating systems. -d sends the files to a specific directory (created if needed); without it, files land in the current directory. unzip -l lists what's inside, and -t tests the archive for corruption without writing anything.

03Risk

RiskLow risk
Requirementsunzip package (preinstalled on most desktop distros)
!Warning: unzip overwrites same-named files in the target directory without asking (it prompts only when the locale encoding mismatches filenames). Extract into a fresh -d folder when unsure. Note: zip filenames are not always UTF-8 — Chinese names from Windows zips may look garbled; use unzip -O gbk on Debian/Ubuntu to fix encoding.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-09-18 · Category: Files & Folders

06Related solutions