Linux - unpack zip file

15 points
Created by:

In this short article, we would like to show how to unpack files from *.zip file using unzip under Linux.

Quick solution:


# or:

unzip /path/to/


  • or /path/to/ should be replaced with a desired zip file path.

Note: by default files will be extracted to the current working directory - check the below usage variants to see how to change output directory path (-d parameter).


Usage variants

In this section, you will see the most common unzip usage cases.

1. Unpack files into the indicated directory

unzip -d ./output

# or

unzip /path/to/ -d /path/to/output


  • -d ./output or -d¬†/path/to/output¬†indicate¬†the location where files will be extracted.

2. Suppress unpacking messages

unzip -q

# or:

unzip -q /path/to/


  • -q disables¬†printing messages related to unpacking in the console.

3. Use zip archive password

unzip -P "zip_file_password"

# or:

unzip -P "zip_file_password" /path/to/


  • -P¬†"zip_file_password" indicates the password necessary to unpack the zip file.

4. Overwrite existing files without prompting

unzip -o

# or:

unzip -o /path/to/


  • -o forces already¬†extracted files overwriting (if there exists extracted file before - it will be overwritten)


      unzip command installation

      To install under Debian/Ubuntu-based Linux it is necessary to use the following command:

      sudo apt-get install unzip

      Alternative titles

      1. Linux - extract zip file
      2. Linux - unzip file
      Donate to Dirask
      Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
      Join to our subscribers to be up to date with content, news and offers.


      Native Advertising
      Get your tech brand or product in front of software developers.
      For more information Contact us
      Dirask - we help you to
      solve coding problems.
      Ask question.

      ‚̧ԳŹūüíĽ ūüôā