# Working with compressed files on Microsoft Windows

> Open and extract .tar.gz and .tar.bz2 files from your Linux hosting account on a Windows computer.

Source: https://helpcenter.ruachost.com/developers/linux/working-with-compressed-files-on-microsoft-windows/

Working with Compressed Files on Microsoft Windows

Learn how to use compressed files, such as **.tar.gz** and **.tar.bz2**, especially when your Windows computer cannot open or extract them.

## Linux-Based Compressed Files

**Ruachost.com** servers run on the Linux operating system, which supports several compressed file formats. While Microsoft Windows commonly uses **.zip** and **.rar** files, Linux typically uses **.gz** and **.bz2** extensions.

These compressed files often contain multiple files bundled into a single archive, known as a **tarball**, which uses the **.tar** extension. For example, a file ending in **.tar.gz** is a tarball compressed using the **gzip** format.

If you’re using **Linux** or **macOS**, your system already supports these formats. For instance, on macOS, you can simply double-click a **.gz** file to decompress it. Likewise, most Linux environments include built-in support for extracting these files either through the desktop interface or the command line.

However, if you’re using **Microsoft Windows**, you’ll need to install an application that can handle these Linux-style compressed files. While commercial programs like **WinZip** and **WinRAR** can work, this article focuses on **7-Zip**, a free and open-source utility for Windows that supports many compression formats.

##

## Using 7-Zip

To get started:

1. Visit [https://www.7-zip.org](https://www.7-zip.org/).
2. Download and install the appropriate version for your computer.

After installing **7-Zip**, you can decompress and extract files easily:

1. Locate the compressed file you want to extract.
2. Right-click the file, select **7-Zip**, and choose **Extract Here**.

   - The contents will appear in the same folder.
   - To extract to a different folder, right-click the file, select **7-Zip → Extract files**, and specify the destination.

**Tip:**\
If you just want to preview the contents without extracting them, right-click the file, choose **7-Zip → Open archive**.

## Extracting Tarball Files (.tar.gz or .tar.bz2)

If your file is a **tarball** (for example, `example.tar.gz` or `example.tar.bz2`), note that this format involves **two steps**:

1. **Decompress the file:** Right-click the `.tar.gz` file, select **7-Zip → Extract Here**. This will create a `.tar` file.
2. **Extract the tarball:** Right-click the newly created `.tar` file, select **7-Zip → Extract Here** again. The files will then appear in the folder.

This process ensures that all files within the tarball are fully extracted and ready to use on your Windows system.
