Announcement

Collapse
No announcement yet.

How to Unzip Files in Linux

Collapse
X
Collapse
  •  

  • How to Unzip Files in Linux



    Archive(zip) files reduce space consumption to make the data transferable. That’s why most files you download from the web are in zip formats like tar, zip, and rar. However, you first need to unzip these files to access the data. 
    Although a few tools are available to unzip files, Linux contains simple commands that can be used to unzip files quickly. Therefore, in this quick tutorial, we will explain different ways to unzip files in Linux. In this section, we have included commands and graphical tools to unzip files without getting errors.
    From File Manager

     If you are new to Linux, we recommend that you use the File Manager to unzip the files. First, open the File Manager and go to the directory where you saved the zip file. 


    Now, right-click on the file; you will get two “extract here” and “extract to” options. So please choose “extract here” to unzip the file in the same directory or “extract to” to unzip the file in any other directory. 


    In case the zip file is password protected, the system will give you a pop-up window to enter the password:


    The unzip Command

    If you’re specifically dealing with a zip format file, use the unzip command. Otherwise, you can jump right into the next section. To unzip a file using the unzip command, first navigate to the directory where the zip file is located. For example, let’s open the Downloads directory:
    cd Downloads




    Now use the unzip command in the following manner:
    unzip Music.zip




    If you want to list the content of a zip file, then please use the -l option:
    unzip -l Script.zip




    You can also extract the zip file data in any other directory by using the -d option: 
    unzip Script.zip -d ~/Documents




    In case the zip file is password protected, you need to use the -P option, including the password in the command: 
    unzip -P 12345 Scripts.zip




    The tar Command

    The tar is the second most commonly used archive format after ‘zip’, which makes it equally essential to be aware of. For unzipping ‘tar’ files, Linux provides the tar command that can handle formats like ‘.tar,’ ‘.tgz,’ ‘.taz,’ ‘.tar.xz’, and more. Let’s take an example of a zip file, ‘Scripts.tar,’ and unzip it using the tar command:
    tar -xvf Scripts.tar




    Furthermore, if the tar archive is compressed using gzip and bzip2, use the ‘-z’ or ‘-j’ options, respectively. For instance, had the file in the above example been ‘Scripts.tar.gz’ or ‘Scripts.tar.bz2’, we would have used:
    tar -xvfz Scripts.tar.gz  OR  tar -xvfj Scripts.tar.bz2




    A Quick Wrap-up

    Unzipping a file is a fundamental task, and as a Linux user, you must know the various methods to unzip a file. This short guide explains the two common commands that let you unzip files of different archive formats. For the zip format, the straightforward approach is via the unzip command, whereas for other formats, you must use the tar command.







    More...
      Posting comments is disabled.

    Categories

    Collapse

    Article Tags

    Collapse

    There are no tags yet.

    Latest Articles

    Collapse

    • 5 Compelling Reasons to Choose Linux Over Windows
      by Kasimba



      by George Whittaker


      Introduction

      In the world of operating systems, Windows has long held the lion’s share of the market. Its user-friendly interface and wide compatibility have made it the default choice for many. However, in recent years, Linux has steadily gained traction, challenging the status quo with its unique offerings. What was once considered the domain of tech enthusiasts and developers is now...
      Yesterday, 06:52 AM
    • NGINX vs Apache; Web Server Comparison
      by Kasimba
      Overview of NGINX and Apache

      NGINX and Apache are leading web server solutions utilized for hosting websites and web applications. Apache, developed by the Apache Software Foundation, offers robust configuration options and extensibility. NGINX, created by Igor Sysoev, is known for its efficiency in handling numerous concurrent connections with low resource utilization. Both servers function not only as HTTP servers but also as reverse proxies, load balancers, and more.

      What is

      ...
      Yesterday, 03:54 AM
    • Monthly News – November 2024
      by Kasimba
      Hi everyone, I hope you are enjoying the BETA so far! This release introduces new features, tools, and artwork, so we anticipate a good number of bug reports. Every single fix helps us refine and improve the final release. Your feedback during the BETA phase is extremely important to us. Linux Mint 22.1 is our […]

      More...
      12-16-2024, 11:50 AM
    • Mastering OpenSSH for Remote Access on Debian Like a Pro
      by Kasimba



      by George Whittaker


      Introduction

      Remote access is a cornerstone of modern IT infrastructure, enabling administrators and users to manage systems, applications, and data from virtually anywhere. However, with great power comes great responsibility—ensuring that remote access remains secure is paramount. This is where OpenSSH steps in, providing robust, encrypted communication for secure remote management....
      12-13-2024, 10:31 PM
    • Unlocking the Full Potential of Linux's Most Versatile Search Tool
      by Kasimba



      by George Whittaker


      Introduction

      The grep command, short for "global regular expression print," is one of the most powerful and frequently used tools in Unix and Linux environments. From sifting through log files to finding patterns in text, grep is a Swiss Army knife for system administrators, developers, and data analysts alike. However, many users limit themselves to its basic functionality, unaware...
      12-13-2024, 09:24 PM
    • Linux Mint 22.1 “Xia” – BETA Release
      by Kasimba
      This is the BETA release for Linux Mint 22.1 “Xia”. Linux Mint 22.1 is a long term support release which will be supported until 2029. It comes with updated software and brings refinements and many new features to make your desktop even more comfortable to use. New features: This new version of Linux Mint contains […]

      More...
      12-12-2024, 09:31 AM
    Working...
    X