How to Unzip a File in Ubuntu

ZIP files are the universal standard for compressing large folders into a single, manageable package. While Windows and macOS can extract ZIP files automatically, doing so on a Linux system like Ubuntu can be slightly confusing if you are new to the command line.

Whether you are using the desktop graphical interface or managing a headless Ubuntu server via SSH, here is exactly how to unzip a file in Ubuntu.

Method 1: Unzip via the Command Line (Terminal)

This is the fastest and most reliable method, and it is the only option if you are managing a server.

First, you must ensure the unzip utility is actually installed on your system. Most Ubuntu installations include it by default, but it is always best to check.

  1. Open your terminal (Ctrl + Alt + T).
  2. Type sudo apt update and press Enter to refresh your package list.
  3. Type sudo apt install unzip and press Enter to install the tool.

Now that the tool is installed, navigate to the folder where your ZIP file is located using the cd command (for example, cd ~/Downloads).

  • To extract everything into the current folder:
    Simply type unzip filename.zip and press Enter. The contents will explode into the folder you are currently standing in.
  • To extract into a specific new folder:
    If you want to keep things organized, use the -d (destination) flag. Type unzip filename.zip -d /path/to/new/folder and press Enter. The system will automatically create the new folder and place all the extracted files safely inside it.

Method 2: Unzip via the GUI (Ubuntu Desktop)

If you are using the standard Ubuntu desktop environment (GNOME), you do not need to open the terminal at all. The built-in Archive Manager handles ZIP files natively.

  1. Open the Files app (the filing cabinet icon in your dock).
  2. Navigate to the location of your downloaded ZIP file.
  3. Right-click on the ZIP file.
  4. Select Extract Here from the context menu.

Ubuntu will immediately create a new, uncompressed folder in that exact same location with the exact same name as the ZIP file. You can simply double-click the new folder to access all your files.

If you want to extract the files to your Documents or Pictures folder instead, right-click the ZIP file and select Extract to…, which will open a window allowing you to choose the exact destination.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.