Ticswipe.com
  • Windows
  • Application
  • Game
  • macOS
No Result
View All Result
Ticswipe.com
No Result
View All Result
Home Technology

How To Unzip A Zip File On Linux

How To Unzip A Zip File On Linux
Share on FacebookShare on TwitterShare on Pinterest

Zip is one of the most popular ways to create compressed files. It is also one of the oldest compressed file formats. Since it is widely used, you will come across zip files often.

In a previous tutorial, I showed how to compress a file in Linux. In this article, we will learn how to unzip a zip file on Linux.

How to unzip a Zip File on Linux using Command line

Unzip is the command used to decompress zip files. Unzip is not installed by default in most Linux distributions, but you can easily install it through the package manager.

Install unzip on Ubuntu and Debian

sudo apt install unzip

Install unzip on CentOS and Fedora

sudo yum install unzip

How to extract files with unzip

Using the unzip command in Linux is very simple. In the directory where you contain the zip file, use the following command:

unzip file.zip

Unzip the zip file to another folder

To extract the ZIP file to a directory other than the current directory, use the -d option:

unzip filename.zip -d /path/to/directory

For example, to extract the WordPress latest.zip file to the /var/www/ directory, you would use the following command:

sudo unzip latest.zip -d /var/www

View the contents of the zip file instead of extracting it

You can check the contents of a zip file without extracting it with the -l option.

unzip -l file.zip

The displayed results have the form:

Archive:  file.zip

  Length      Date    Time    Name

---------  ---------- -----   ----

   154913  2020-04-13 11:55   house.jpg

      623  2020-04-23 14:56   java.log

---------                     -------

   155536                     2 files

Extract the zip file containing the password

To extract a password protected file, enter the zip command with the -P option followed by the password:

unzip -P PasswOrd filename.zip

Entering a password on the command line is not secure. So the safer way is that you will unzip the file normally without providing the password. If the ZIP file is encrypted, unzip will prompt you for a password:

unzip filename.zip

Output:

archive:  filename.zip

[filename.zip] file.txt password:

Extract multiple zip files simultaneously

You can use regular expressions to match multiple files at once.

For example, if you have a lot of ZIP files in the current working directory, you can extract all the files with just one command:

unzip '*.zip'

Note that you need parentheses around *.zip. Otherwise, you will get an error.

See more: How To Zip Files On Linux

How to decompress Zip File on Linux

You don’t need to use a terminal to extract files if you are using Linux Desktop. Here I am using Ubuntu 20.04 version, but this decompression process is similar to other Linux distributions.

Open the folder containing your zip file. Right-click on the file and select Extract Here.

How To Unzip A Zip File On Linux - Ticswipe.com

Unlike the unzip command, the Extract Here option will create a folder with the same name as the archive and all the contents of the archives are contained within this newly created folder.

How To Unzip A Zip File On Linux - Ticswipe.com

If you want to extract to a directory other than the current directory, select Extract to navigate to the directory you want.

How To Unzip A Zip File On Linux - Ticswipe.com

If you want to preview the contents of the zip file, select Open With Archive Manager

How To Unzip A Zip File On Linux - Ticswipe.com
How To Unzip A Zip File On Linux - Ticswipe.com

In case the zip file has a password protected setting, you will need to open the zip file with Archive Manager as above then select Extract in the upper left corner, a window will appear asking you to enter the password:

How To Unzip A Zip File On Linux - Ticswipe.com

It is done. You have successfully extracted the zip file in Linux. Hope this little tip will help you quickly extract zip files in Linux operating systems.

Related Posts

What is Ubuntu Operating System
Technology

What is Ubuntu Operating System?

10 Reasons To Use Elementary OS
Technology

10 Reasons To Use Elementary OS

Linux Mint OS
Technology

Linux Mint and 5 Reasons Why It’s Better Than Ubuntu

Next Post
Top 8 Video Editing Apps For Android

Top 8 Video Editing Apps For Android

Top 6 Free YouTube to MP3 Converter

Top 6 Free YouTube to MP3 Converter

Kali Linux OS and 15 Things Need To Know

Kali Linux OS and 15 Things Need To Know

Latest Posts

How to Cut and Trim Videos in Windows Using Video Editor

How to Cut and Trim Videos in Windows using Video Editor

How To Hide Taskbar On Windows 10

How to Hide Taskbar on Windows 10

How to Convert Excel to PDF in Windows 10

How to Convert Excel to PDF in Windows 10

How To Disable Laptop Keyboard Windows 10

How To Disable Laptop Keyboard On Windows 10

How To Fix This Device Cannot Start. (Code 10)

How to Fix This device cannot start. (Code 10) current device power state cannot support this request

How To Change Language On Windows 10

How to Change Language on Windows 10

Popular Posts

Best Offline Games for PC

Fix “Winrar the archive is either in unknown format or damaged”

Fix isdone.Dll error codex while installing the game

Fix The program can’t start because d3dx9_43.dll is missing

Editor Picks

Fix This device cannot start. (Code 10)

Fix You don’t currently have permission to access this folder

Best fighting offline games for PC

Fix Your PC ran into a problem and needs to restart Windows 10

Others Link

About us

Contact us

Privacy Policy

DMCA.com Protection Status

Our Partners

Hawk Host – Web Hosting, VPS Hosting, Reseller Hosting

1Password: Password Manager for Families & Businesses

GoDaddy: Domain Names, Websites, Hosting

Namecheap: Register Cheapest Domain

Copyright © 2022 Ticswipe . Hosted by Hawkhost.

No Result
View All Result
  • Windows
  • Application
  • Game
  • macOS

Copyright © 2022 Ticswipe . Hosted by Hawkhost.