Unzip File on Ubuntu OS

With the 'unzip' package installed, you can quickly extract the contents of your .zip archives


When downloading files from the Internet, it’s common to receive them in an archive format, such as .zip. Archives serve various purposes, including reducing download sizes, organizing multiple files into a single package, providing basic integrity checks, and sometimes adding security with passwords. On Windows, GUI archiver tools like WinZip, 7zip, or WinRAR make it easy to handle different archive types. Ubuntu Linux, on the other hand, offers a built-in Archive Manager for handling these archives in a graphical user interface (GUI).

However, what do you do if you’re working on Ubuntu Linux and need to unzip a .zip file from the command line? This situation might arise when you’re using Ubuntu Server or a terminal-based environment. In this guide, we’ll show you how to unzip .zip files on Ubuntu Linux using the terminal.

Installing the unzip Package

Before you can extract .zip files from the terminal, you need to ensure you have the ‘unzip’ package installed. To do this, follow these steps:

  1. Open a terminal by searching for “Terminal” in your applications or pressing Ctrl+Alt+T.
  2. To install the ‘unzip’ package, use the following command:


    You may be prompted to enter your admin password and confirm the installation by typing ‘yes.’ Allow the package manager (apt) to allocate additional disk space as required.

Extracting .zip Files

Now that you have ‘unzip’ installed, you can extract .zip files using the following command:


This command will extract the contents of the ‘archive.zip’ file, which should be located in your current directory, and it will extract the contents to the same directory.

If you wish to extract the .zip file to a different directory, you can use the ‘-d’ option followed by the destination folder path. Here’s how:


For example:


This command will extract the contents of ‘mysite.zip’ to the ‘/var/www’ directory. You can specify either a full or relative directory path.


Unzipping .zip files on Ubuntu Linux via the terminal is a straightforward process. With the ‘unzip’ package installed, you can quickly extract the contents of your .zip archives. Whether you’re working in a terminal-only environment or prefer command-line operations, Ubuntu Linux provides you with the tools necessary to manage these archive files efficiently.

Leave a Reply

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