Linux file archive unzipping instructions: Steps You Need to Know

how to unzip a file in linux

The zip format is widely used for file sharing because it offers protection against a wide range of potential threats, including destruction and theft. To further ensure the privacy of the stored files, a password can be used to restrict access to them.

However, there are still numerous challenges when working with these sorts of files, such as opening the zip files, compressing data, etc., especially for novice users or those who are not experienced enough with computers or do not have an IT background.

In this guide, we’ll go through the steps necessary to extract the contents of an a.zip file on a Linux system (Ubuntu). Identifying the zip files is a prerequisite for moving on. For compressed files, look for the.tar.gz or.zip extension among the downloaded files (or the file you intend to use).

The files inside a compressed archive (or “zip”) file are inaccessible until the archive is extracted, at which point they can be seen without difficulty.

Prerequisite:

  • The ability to open a command prompt (Ctrl-Alt-T)
  • Data compression and decompression program that requires a root password

How to Install Unzip Utility in The Ubuntu?

You need the unzip package installed in order to decompress a zip archive. Even though most up-to-date Linux variants already include unzip functionality, it doesn’t hurt to double-check in order to prevent any unpleasant surprises.

The following instructions will help you install unzip in Ubuntu and Debian-based variants. It will let you know if it’s already present on your computer’s OS.

Step 1:One must first open a terminal and enter the given command and hit enter, as shown in the output:

Command :

  • sudo apt install unzip

Output

how to unzip a file in linux

You can zip and unzip the files as needed after installing the unzip software on your OS.

In this article, we’ll go over both the theoretical and practical aspects of unzipping compressed files in the Linux operating system.

  • Unzip files using a Linux terminal
  • Unzip files using GUI

Unzip Files Using the Linux Terminal

The methods below will show us how to zip files without compromising their quality in Linux and how to open zipped files.

To unzip a file under Linux, follow these steps:

Step 1 Unzipping files in Linux is the first step and is a simple process. To begin, we will open the terminal and navigate to the location of our zip file, as indicated in the image below:

how to unzip a file in linux

Step 2 The second step is to unzip the file using the.zip extension and the ls command to list all of the files in the current directory.

  • unzip zipped_file.zip

Let’s Understand the Working of This Command by Following Example:

So, let’s say there’s a packaged file called “samplefile.zip” in your downloads folder. First, we need to open the terminal and navigate to the location where the “simplefile.zip” was downloaded.

  • cd Downloads
  • ls      < To display all available files in current folder>

Step 3  After the file has finished unzipping, you may view its contents as indicated in the image by using the command unzip “samplefile.zip”> and pressing Enter.

Read More: What Is Zinmanga Application? Check Here for All Updates!

cd Downloads ls < To display all available files in current folder>

How Zip Files in Linux?

When You Want to Compress Your Regular Files Into Zip Format, the Procedure Differs Slightly from What We Did Before.

in Order to Convert a File (like Samplefile.Mpg), We Need to Navigate to The Folder in Which It Is Stored on Your Computer. when You’re in The Right Place, You Can Use This Command to Compress the File.

Command:

  • Zip -r samplefile.zip samplefile.mpg

Zip -r samplefile.zip samplefile.mpg

Instead of Navigating to The Directory, We May Just Specify the Path of The Zip File We Wish to Unpack. to Accomplish This, Think About the Following Instructions:

Zip -r samplefile.zip samplefile.mpg

1. Launch the Terminal and Enter the Command Below.

  1. unzip code-stable.zip -d folder1

It will show the following output.

  1. unzip code-stable.zip -d folder1
  2. Archive:  unzip code-stable..zip
  3.   inflating: my_zip/625993-PNZP34-678.jpg
  4.   inflating: my_zip/License free.txt
  5.   inflating: my_zip/License premium.txt
In General, This Sounds Like a Really Useful Tool. if The User Is Not Careful, Though, the Above Command Could Cause an Even Worse Issue. This Command’s Biggest Drawback Is that It Extracts the Contents of The Zip File to The Current Directory or Folder, Which Might Be Problematic under Some Circumstances.

Unzip files to the Directory

Step1:When the Target File Is Zipped, It Is Extracted Into the Current Directory. to Overcome the Aforementioned Issue, Simply Extract the File to A New Directory. Consequently, All of Our Extracted Files Will Be Placed in That Folder. if The User Specifies a Directory and It Does Not Already Exist, It Will Create It and Give It the Name Supplied.

  1. unzip filename.zip -d unzipped_directory (or directory name)

Let’s Have a Look at How to Unzip a File in A Certain Location.

Command <unzip samplefile.zip -d \Akash>

2. Unzip files via the Graphic User Interface:

Step 1. As a First Step, Launch the Terminal and Navigate to The Location of The Zipped or Compressed File You Wish to Extract. Once You’re in That Folder, Use the Terminal Command Shown Below.

Follow This Example to Learn how To Use This Command:

how to unzip a file in linux.

Let’s Say You Have a Zip Archive (samplefile.Zip, for Example) that You Wish to Unpack Into a Specific Folder (e.G., Akash).

The Target Folder from Which You Wish to Extract the Archived File Must Be Specified. That’s Why Our Orders Will Look Like This:

how to unzip a file in linux

Zip Files Can Be Opened with A Graphical User Interface.

how to unzip a file in linux

This Approach Is so Easy that Even Complete Novices Can Apply It. It’s Merely Patterned After the Window’s Own Procedure for Unzipping Compressed Files. in Order to Extract the Zipped Files Using a Graphical User Interface, Please Refer to The Steps Provided Below.

how to unzip a file in linux

Two, Access the Directory Containing the Zipped File (for Instance, Textfile.Zip) and Open It, as Illustrated Below:

how to unzip a file in linux

Third, Once the Compressed File Has Been Chosen, Click the Right Mouse Button to Access More Menu Choices:

Second, Select the Desired Extraction Location by Clicking “Extract Here” or “Extract To.” Select the Folder Where You Want the File Extracted To, and Then Click the “Extract” Button.

In Step 4, if You Wish to Extract that File Somewhere Other than The Default Location, You Can Do So By Selecting the “Extract To” Option.

how to unzip a file in linux

Clicking the “Extract To” Button Will Bring up A New Window Where You Can Choose the Location on Your Computer Where the Extracted Data Will Be Saved. After Deciding Where to Look, Use the Select Button.

how to unzip a file in linux

Fifth, we’ll double-check that the file has been unzipped by going to the designated folder or directory.

Kimberly

Kimberly is a freelance writer with a love of writing and traveling. She has been writing for most of her life and has been published in various magazines and online publications. She writes about entertainment, technology, and lifestyle-related topics at Gadgetgrapevine.com. Kimberly is always looking for new writing opportunities and loves learning about new cultures and experiences.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *