- 1Linux Topics Index
- 2How to Create a File in Linux
- 3How to Rename a File in Linux
- 4How to Copy a File in Linux
- 5How to Move a File in Linux
- 6How to Delete a File in Linux
- 7How to Create a Directory in Linux
- 8How to Delete a Directory in Linux
- 9How to Copy Directories Recursively in Linux
- 10Delete Directories Recursively in Linux
- 11How to View Hidden Files in Linux
- 12How to Create a Hidden File in Linux
- 13How to Create a Hidden Directory in Linux
- 14How to Find Files in Linux Using find Command
- 15Find Files in Linux Using locate Command
- 16How to View File Contents Using cat in Linux
- 17How to View File Contents Using less in Linux
- 18View File Contents Using the more Command in Linux
- 19Compare Files Using diff Command in Linux
- 20Compare Files in Linux Using cmp Command
- 21Check File Type in Linux with file Command
- 22Create Symbolic Links with ln -s in Linux
- 23How to Archive Files Using tar Command in Linux
- 24Compress Files with gzip in Linux – Beginner Tutorial
- 25How to Compress Files Using bzip2 in Linux
- 26Compress Files in Linux Using zip Command
- 27Extract Compressed Files using tar in Linux
- 28Extract ZIP Files on Linux with unzip
- 29How to Extract .gz Files using gunzip in Linux

- 1Linux Topics Index
- 2How to Create a File in Linux
- 3How to Rename a File in Linux
- 4How to Copy a File in Linux
- 5How to Move a File in Linux
- 6How to Delete a File in Linux
- 7How to Create a Directory in Linux
- 8How to Delete a Directory in Linux
- 9How to Copy Directories Recursively in Linux
- 10Delete Directories Recursively in Linux
- 11How to View Hidden Files in Linux
- 12How to Create a Hidden File in Linux
- 13How to Create a Hidden Directory in Linux
- 14How to Find Files in Linux Using find Command
- 15Find Files in Linux Using locate Command
- 16How to View File Contents Using cat in Linux
- 17How to View File Contents Using less in Linux
- 18View File Contents Using the more Command in Linux
- 19Compare Files Using diff Command in Linux
- 20Compare Files in Linux Using cmp Command
- 21Check File Type in Linux with file Command
- 22Create Symbolic Links with ln -s in Linux
- 23How to Archive Files Using tar Command in Linux
- 24Compress Files with gzip in Linux – Beginner Tutorial
- 25How to Compress Files Using bzip2 in Linux
- 26Compress Files in Linux Using zip Command
- 27Extract Compressed Files using tar in Linux
- 28Extract ZIP Files on Linux with unzip
- 29How to Extract .gz Files using gunzip in Linux

- 1How to Add a New User in Linux
- 2Modify Existing User in Linux
- 3Delete a User in Linux — Step-by-Step for Beginners
- 4Create a User Group in Linux - Step-by-Step Tutorial
- 5Linux: Add User to Group
- 6How to Remove a User from a Group in Linux
- 7Delete a User Group in Linux - Beginner Friendly Tutorial
- 8Linux su Command Tutorial – Switch Users Easily
- 9Linux sudo Command - Execute as Another User
- 10Change a User's Password in Linux Using passwd
- 11Set Password Expiry in Linux using chage
- 12Lock a User Account in Linux
- 13How to Unlock a User Account in Linux
- 14Configure User Login Shell in Linux
- 15How to Configure User Environment Variables in Linux
- 16Edit .bashrc and .profile in Linux - User Startup Files Tutorial
How to Extract Compressed Files Using unzip Command
Next Topic ⮕How to Extract .gz Files using gunzip in Linux
How to Extract Compressed Files Using unzip
Command in Linux
Hey there! 👋 Welcome to this Linux tutorial on working with ZIP files.
If you're coming from Windows or macOS, you're probably used to just double-clicking ZIP files to extract them. But in Linux, we use a simple and powerful command-line tool called unzip
.
Let’s break this down step by step, just like we would if we were sitting side-by-side at your terminal.
🔧 Step 1: Make Sure unzip
is Installed
Most Linux distributions come with unzip
pre-installed. But if yours doesn't, you can install it easily using your package manager.
sudo apt install unzip # For Ubuntu/Debian
sudo yum install unzip # For CentOS/RHEL
sudo dnf install unzip # For Fedora
Once installed, you're good to go.
📁 Step 2: Extract a ZIP File
Now let’s say you have a ZIP file called project.zip
. To extract it, just run:
unzip project.zip
This will extract the contents of project.zip
into the current directory.
✅ Output:
Archive: project.zip
inflating: index.html
inflating: style.css
inflating: script.js
📂 Step 3: Extract to a Specific Directory
If you want to extract the ZIP file into a folder named project/
, you can do this:
unzip project.zip -d project/
This is especially useful for keeping things clean and organized.
🔍 Step 4: View the Contents Without Extracting
Want to peek inside the ZIP without extracting it? You can list the contents using:
unzip -l project.zip
✅ Output:
Archive: project.zip
Length Date Time Name
--------- ---------- ----- ----
1200 2025-07-02 09:00 index.html
9000 2025-07-02 09:00 style.css
3400 2025-07-02 09:00 script.js
--------- -------
13600 3 files
🧹 Step 5: Overwrite or Skip Existing Files
If some files already exist in the directory, unzip
will ask you whether to overwrite them. You can automate this with:
-o
: Overwrite files without asking-n
: Never overwrite existing files
unzip -o project.zip # Overwrite without prompt
unzip -n project.zip # Skip existing files
🎯 Final Tip
ZIP files are super common when sharing projects or downloading from the internet. Knowing how to use unzip
gives you an edge and helps you stay productive in any Linux environment.
That’s it! You've now learned how to extract ZIP files like a Linux pro 💪
See you in the next tutorial!