Last Updated :
30 Sep, 2024
If you’re trying to extract a TAR file on Windows, particularly a .tgz or tar.gz file, there are several ways to do it easily. Although Windows doesn’t natively support extracting these files, there are plenty of TAR file extraction tools for Windows that can help you. This guide will show you how to open .tgz files on Windows and outline the steps to effectively unpack TAR files using third-party tools or commands.
Table of Content
- Steps to Extract TAR Files (.tgz) in Windows
- Method 1: Extract TAR Files Using Command Prompt
- Method 2: Extract TAR Files Using Third-Party Applications
- Method 3: Extract TAR Files Using Online Converters
- How to Extract a TAR File (.tgz) on Windows — FAQs
For unzipping TAR Files on Windows, the following methods should be used. We will start with one simple command where no third-party application help will needed.
Method 1: Extract TAR Files Using Command Prompt
Step 1: Search for the Command Prompt in the Search Bar. Open the prompt in the Administrative Format.
Step 2: Execute the following command. It will help to convert the TAR File to File Explorer Format without having much time. It will take some time to complete the process.
Command: tar -xvzf <TAR-FIle-Location> -C <New-Location>
If you want to extract the TAR Files on your local device, then have any third-party application on your device. There are many third-party applications present like 7-Zip or WinZip, etc. Using any one of those, you can Open TAR FIle on Windows.
You have to download & install the third-party apps on the device. Later, select any one TAR file & it will be directly converted to the simple folder structure. To open any TAR Folder inside the new one, select it again.
Hooray! You now have one third-party application installed on the device to Unzip Linux TAR Format on Windows.
Now, if you want to get your job reduced to some folds, there is another option present. It is to Extract the TGZ File Online. There are many Online Converters present on the internet that can be used for successful conversion.
You have to select the TAR File & want to choose the operation. If you want, it will convert the TAR File to RAR file which is the Native File Compressor for Windows. Or it can directly extract the files on your desktop.
Conclusion
Extracting TAR files on Windows is simple with the right tools. Whether you’re using a third-party utility or command-line options, knowing how to extract .tgz files can help you manage compressed files efficiently. By following these steps, you’ll be able to unzip TAR files on Windows with ease and have access to the data you need without any hassle.
Если у вас есть файлы .tar.gz, .tgz или .gz, вы можете использовать шаги ниже, чтобы использовать инструмент командной строки tar для извлечения его содержимого в Windows 10.
Файл в формате.tar.gz — это файл, который был создан с использованием tar -архива приложения на основе Unix, а затем сжат с использованием сжатия gzip. Эти файлы часто вы можете найти с двойным расширением (.tar .gz), расширение также можно сократить до.tgz или.gz.
Обычно tar-файлы используются пользователями Ubuntu и macOS для архивирования данных и резервного копирования, но иногда пользователи Windows 10 также могут столкнуться с этими типами файлов и могут нуждаться в извлечении их содержимого.
Хотя вы можете использовать ряд сторонних приложений, таких как 7-Zip, иногда эти приложения плохо работают с файлами, созданными на другой платформе, и медленно распаковывают большое количество файлов. К счастью Windows 10 включает встроенную поддержку tar, вы можете использовать командную строку (CMD) для распаковки этих файлов. Кроме того, вы даже можете использовать подсистему Windows для Linux (WSL), которая обеспечивает встроенную поддержку Ubuntu, Fedora и SUSE, следовательно, вы также можете получить доступ ко многим инструментам Linux, включая tar, для быстрого извлечения содержимого из tar-архивов.
В этом руководстве вы узнаете, как использовать собственные команды tar в Windows 10 с помощью командной строки и Ubuntu для извлечения содержимого файла .tar.gz.
- Содержание
- Как извлечь tar-архивы .tar.gz, .tgz или .gz, используя tar в Windows 10
- Как извлечь tar-архивы .tar.gz, .tgz или .gz, используя tar в Linux на Windows 10
Как извлечь tar-архивы .tar.gz, .tgz или .gz, используя tar в Windows 10
Используйте эти шаги для извлечения .tar.gz, .tgz, .gz и .zip файлов с использованием tar в Windows 10 без необходимости установки подсистемы Windows для Linux:
Шаг 1: Откройте меню «Пуск». Начните набирать Командная строка, кликните правой кнопкой мыши первый результат в поиске и выберите параметр «Запуск от имени администратора».
Шаг 2: Введите следующую команду, чтобы использовать tar для распаковки файлов, и нажмите Enter :
tar -xvzf C:\путь_к_архиву\имя_архива.tar.gz -C C:\путь_к_папке\где_будет_распакован_архив
*Встроенная поддержка tar в Windows 10
Совет: поскольку вы используете tar в Windows 10, вам не нужно указывать путь, как если бы вы работали в Linux. Вы можете просто использовать формат пути, используемый Windows.
После того, как вы выполните эти шаги, через несколько секунд все файлы и папки будут извлечены по указанному вами пути назначения.
Предполагается, что вы распаковываете архив, созданный в другой системе, поэтому пропускаем некоторые аргументы, обычно необходимые для сохранения разрешений, которые в Windows 10 не нужны для доступа к файлам.
Как извлечь tar-архивы .tar.gz, .tgz или .gz, используя tar в Linux на Windows 10
Чтобы использовать tar в Linux, вам нужно включить подсистему Windows для Linux (WSL), а затем установить Ubuntu из магазина Microsoft Store.
После того, как вы установили Ubuntu в Windows 10, выполните следующие шаги, чтобы извлечь файл .tar.gz :
Важное замечание: Начиная с версии 1803, инструмент управления командами tar входит в состав Windows 10, что означает, что для использования средства больше не требуется использование подсистемы Windows для Linux.
Шаг 1: Откройте меню «Пуск». Найдите Ubuntu и откройте приложение.
Шаг 2: Введите следующую команду, чтобы извлечь содержимое файла.tar.gz, и нажмите Enter :
sudo tar -xvzf /mnt/c/PATH/TO/TAR-FILE/Downloads/FILE-NAME.tar.gz -C /mnt/c/PATH/TO/DESTINATION/FOLDER
*Команда tar в Windows 10
Замените «c/PATH/TO/TAR-FILE/Downloads/FILE-NAME.tar.gz»
— на путь и имя вашего архива
Замените «c/PATH/TO/DESTINATION/FOLDER»
— на путь куда будет распакован архив
В приведенной выше команде мы набираем sudo для запуска приложения от имени администратора, tar для вызова приложения, а затем передаем ему несколько аргументов, в том числе:
- x — указывает tar, что вы хотите извлечь содержимое.
- v — Это необязательный аргумент для отображения процесса извлечения. В противном случае вы увидите только мигающий курсор, пока процесс не будет завершен.
- z — указывает tar распаковать содержимое файла.tar.gz с помощью gzip.
- f — указывает tar имя файла, который вы собираетесь извлечь.
Затем вам нужно указать путь к архивному файлу, который вы хотите извлечь. Вы заметите, что путь начинается /mnt/c/, а не c:\ потому, что мы на самом деле работаем в Linux.
- -C — (дефис и заглавная C ) используется, чтобы указать tar сменить папку.
Когда вы выполняете команду, вы начинаете с исходной папки, а затем вам нужно указать папку назначения куда будет распакован архив. Вы можете извлекать файлы в любую папку, которую хотите, но не забудьте начать путь, /mnt/
Очень важно обращать внимание на прописные и строчные буквы при вводе команды в Linux, так как Downloads отличается от downloads
В этом руководстве мы рассмотрели основные шаги для выполнения конкретной задачи. Если вы не являетесь пользователем Linux, и хотите узнать больше о инструменте WSL ознакомьтесь с нашими руководствами:
- (WSL2) Что такое подсистема Windows для Linux 2?
- Как установить подсистему Windows для Linux 2 в Windows 10
- Установите Linux из Магазина Microsoft в Windows 10.
- Доступ к файлам WSL Linux с помощью Проводника Windows 10
- Как запустить Ubuntu Bash в Windows 10.
- Как запускать приложения Linux GUI в Windows 10.
- Как Выполнить команды Linux из Командной строки Windows 10.
- Проверьте погоду в Windows 10 с помощью Linux Bash
- Новый Windows Terminal в магазине Microsoft.
A .tar.gz file, also known as a tarball, is a compressed archive used in UNIX and Linux systems. This format involves multiple files bundled into a single archive and compressed using gzip
compression.
Although .tar.gz is commonly associated with UNIX and Linux distributions, you can also extract these files in Windows using various third-party tools.
This tutorial will show you how to extract .tar.gz files in a Windows environment.
Requirements
- A Windows system (this tutorial uses Windows 11).
- WinRAR, WinZip, and 7-Zip installed (for specific examples).
- The tar tool (for some examples).
- Access to Command Prompt.
How to Extract .tar.gz File in Windows
Since Windows doesn’t natively support .tar.gz files, extracting involves third-party tools or non-native commands. The following text outlines the process of extracting a .tar.gz file in a Windows environment.
Extract .tar.gz File in Windows Using tar Command
The tar (tape archive) command is a command-line utility for archiving files.
The command bundles multiple files and directories into a single file archive but doesn’t compress data on its own. Therefore, it is often used with compression tools, such as gzip
(tar.gz files) or bzip2
(tar.bz2 files), to reduce the overall archive size.
The tar
command is not a native Windows command. It usually doesn’t come preinstalled in older Windows systems. However, newer versions (starting from Windows 10) have it preinstalled.
The following example shows how to extract a .tar.gzip file called archive_1 using the tar
command. The archive_1 consists of three files: sample_file1, sample_file2, and sample_file3.
To extract the files using tar
:
1. Open the Command Prompt.
2. Use the cd command to navigate to the directory the archive is in. In this case:
cd C:\files
3. Use the following syntax to extract files:
tar -zxvf [archive_name.tar.gz]
This command consists of:
-z.
Specifies the input is compressed withgzip
.-x
. Stands for extract.-v
. Enables verbose mode to provide detailed output during extraction.-f
. Specifies the filename to be extracted.
For instance, in our case:
tar -zxvf archive.tar.gz
The output lists extracted files.
Note: Master the Command Prompt with our cmd commands guide which features a free downloadable cheat sheet.
Extract .tar.gz File in Windows Using 7-Zip
For a more GUI-friendly approach to extracting .tar.gz files, use 7-Zip.
Follow these steps to extract files from a .tar.gz archive:
1. Right-click the archive.
2. Find and hover over 7-Zip.
3. Choose Extract Here to extract files to the archive folder.
4. Alternatively, select Extract files to pick where to extract the files.
A new window opens to manage where and how to extract files.
Extract .tar.gz File in Windows Using WinRAR
Another way to access archive files is to extract them via WinRar. To accomplish this, follow these steps:
1. Right-click the archive.
2. Hover over the WinRar icon.
3. Choose Extract Here to extract the file to your current location.
Alternatively, select one of the offered locations or set one up by clicking the Extract files… option.
Extract .tar.gz File in Windows Using WinZip
Extracting .tar.gz files using WinZip is also quite straightforward.
To get the files, follow these steps:
1. Right-click the archive file and hover over WinZip.
2. Choose whether to unzip to one of the offered locations or define one with the Unzip to… option.
The Unzip to…option opens up another window with extra settings.
3. Select Unzip to start the process.
Conclusion
After reading this article, you know how to extract .tar.gz files in Windows using the tar
command, 7-Zip, WinZip, or WinRAR.
Next, learn how to extract .tar.gz files in Linux.
Was this article helpful?
YesNo
A file with the TGZ or GZ file extension is created using the Unix-based archival application tar and further compressed using GZIP Compression. These files are made up of a collection of files placed in a TAR archive mainly for making storage and tracking easy. TAR files are often compressed once created; the compressed TAR files are called tarballs and sometimes use a “double” extension like “.TAR.GZ” but are usually shortened to “.TGZ” or “.GZ”.
.TAR.GZ, .TGZ or .GZ. files are typically seen with software installers on Unix-based operating systems like Ubuntu and macOS for data archival and backups. But they are sometimes used for regular data archiving purposes; hence, Windows 11/10 users may also come across such types of files and may need to extract their content.
Extracting a .TAR.GZ, .TGZ or .GZ. file is easy. They can be extracted using third-party applications like 7-Zip and PeaZip which are free and open-sourced. In addition to external apps, Windows 10 includes native support for TAR which can help you extract TAR files using simple Command Prompts. Today we discuss a few of these methods:
- Using third-party software
- Using the native tar commands
Let’s look at these two methods in detail.
1] Using third-party software
You can use third-party software to extract compressed files.
a] Open TGZ files with 7-Zip
7-Zip is a free, open-source file archiver with a high compression ratio. This software can be used on any computer, including the ones in a commercial organization. This utility program can help you extract compressed files and create your own compressed files in several different formats. To extract TAR files using 7-Zip, follow the below steps:
1] Open 7-Zip webpage and download either 32 or 64-bit 7-Zip version based on your System Type.
Note: To check your system type, open ‘Settings’ then go to ‘System’ and click on ‘About’.
2] Once downloaded, open the 7-Zip installer to install the software to your Windows system.
3] Next, open the 7-Zip app from the Search Menu.
4] Now, within the 7-Zip’s file browser go to the folder that includes your TGZ file.
5] Now select and right-click the TGZ file, hit, 7-zip, and press the Extract files to open the Extract window as shown below.
6] You will see a new folder path is already included in the ‘Extract to’ text box. But if you want you can modify this path as required.
7] Press ‘OK’ to extract the TGZ file.
8] Now, double-click the extracted TAR folder in the same 7-Zip window to open it.
Once you open the initial archive, double-click on the sub TAR folders/files to open and view the contents.
Read: How to zip and unzip files in Windows 111/0 using the built-in feature.
b] Convert TGZ Files to the ZIP Format using online TGZ converter
Windows 10’s File Explorer allows the users to extract ZIP Files. Intrinsically, you can open the contents of a TGZ file by converting it to the ZIP format first. Once the files are converted, users can utilize the ‘Extract All’ option to decompress the ZIP. You can convert TGZ files to ZIP format using online converters, here is how:
1] Open the Convertio web tool in your web browser. This is an Online TGZ (TAR.GZ) Converter that can convert files to and from tgz on the web.
2] Now select ‘Choose Files’ to select a TGZ archive to convert to ZIP.
3] Select the file from the folder and click ‘Open’ to add the file to the online converter.
4] Select the conversion type to ‘Zip’
5] Now hit the ‘Convert’ button to convert the archive.
5] Click ‘Download’ and save the new ZIP archive.
6] Go to the downloaded files folder and double-click the downloaded ZIP file to open its Extract tab. Now, hit the ‘Extract all’ button to open the window directly below.
7] Select the Destination and hit Extract.
Now double click the ZIP’s extracted folder and open its content.
Read: How to install CURL on Windows.
2] Open TAR files in Windows using native tar commands
Windows 11/10 consists of native support for tar that you can use with Command Prompt to extract these files. In addition to this, users can use the Windows Subsystem for Linux (WSL) that brings native support for Ubuntu, Fedora, and SUSE, and therefore you can also access many Linux tools, including tar to instantly extract content from tarballs. Here we discuss the steps to use native tar commands on Windows 11/10 using Command Prompt and Ubuntu to extract contents of a .tar.gz file.
a] Extract .tar.gz, .tgz, or .gz tarballs using tar on Windows 11/10
For extracting .tar.gz, .tgz, or .gz files using tar on Windows 111/0, use these steps:
1] Open the ‘Start’ menu.
2] Search for ‘Command Prompt’
3] Right-click the first result and hit ‘Run as administrator’
4] Now type the below command to use tar to extract the files and hit ‘Enter’:
tar -xvzf C:\PATH\TO\FILE\FILE-NAME.tar.gz -C C:\PATH\TO\FOLDER\EXTRACTION
Make sure to update the syntax to include the source and destination paths.
Once the above steps are completed, you will have all the files and folders extracted to the specified destination.
b] Extract .tar.gz, .tgz, or .gz tarballs using tar on Linux on Windows 11/10
Another way of using tar on Windows is by installing Ubuntu on your system. Once installed on your Windows 11/10 system follow the steps given below:
1] Launch ‘Ubuntu’ from the ‘Start’ menu
2] Now, type the below-given command to extract the content of .tar.gz file:
sudo tar -xvzf /mnt/c/PATH/TO/TAR-FILE/Desktop/FILE-NAME.tar.gz -C /mnt/c/PATH/TO/DESTINATION/FOLDER
Make sure to update the syntax to include the source and destination paths.
3] Now hit the ‘Enter’ key.
Now, you will have all the files and folder extracted to the specified destination.
Thus, you can now extract .TAR.GZ, .TGZ or .GZ. on Windows 11/10.
Read next: How to extract CAB File using command-line tools.
Download Article
Download Article
- Mac (Finder)
- Linux & Mac (Terminal)
- Windows
|
|
If you have a file on your PC or Mac that ends with .TAR, it’s an archive file that typically contains one or more files or folders that need to be unpacked. If the file’s name ends with .TGZ or .TAR.GZ, the file is not only archived in the TAR format, but also compressed, which makes for faster and easier transfer between computers. Whether or not your TAR file is compressed, it’s super easy to unpack and open the files and directories on macOS, Windows, and Linux. We’ll show you the easiest ways to open TAR, TGZ, and TAR.GZ files on any PC or Mac.
Things You Should Know
- On a Mac, just double-click the TAR, TGZ, or TAR.GZ file to unpack it.
- On Windows, you’ll need free software like 7-Zip to untar files.
- If you’re using Linux or the Mac Terminal app, use «tar -xvf» for TAR files, or «tar -xvzf» for files ending in TGZ or TAR.GZ.[1]
-
You can find this two-toned smiley face icon in your Dock.
-
If you downloaded the file from the internet, you’ll usually find it in your Downloads folder.
- If you’re not sure where you placed the file, you can search for specific file types (such as .TAR or .TGZ) in Finder.
Advertisement
-
This extracts the files (and folders, if any) from the TAR file and places them in the current folder.
- You can now double-click any of the extracted files to open them in their default apps.[2]
- You can now double-click any of the extracted files to open them in their default apps.[2]
Advertisement
-
If you want to open a TAR, TGZ, or TAR.GZ file at the prompt in Linux or macOS, you can use the tar command. If you’re using a Mac, it’s a little easier to use Finder to extract these archived files, but using the command line is handy if you’re connected remotely through SSH or writing scripts.
- If you’re using Linux on a PC, press Ctrl + Alt + T to open a new Terminal window.[3]
- If you’re logged in to your Mac’s desktop, you can open Terminal in Finder by navigating to Applications > Utilities > Terminal, or by searching for Terminal in Spotlight.
- If you’re using Linux on a PC, press Ctrl + Alt + T to open a new Terminal window.[3]
-
Type cd, followed by the full path to the file. Then, press Return or Enter to enter the directory.
- For example, if the TAR file is on your Mac’s desktop, you’d type cd Desktop and press Return. If it’s in your Mac’s Downloads folder, you’d use cd Downloads.
- If you’re not sure where the file is, you can locate it in Finder first (on a Mac) or use the locate or find command at the prompt.
- To make sure you’re in the right folder, type ls -a and press Return or Enter at the prompt. You’ll see a list of files, which should include your TAR, TGZ, or TAR.GZ file.
-
The command you’ll use depends on the extension of the file:
- For .TAR files, type tar -xvf and press Return or Enter.
- For .TGZ and .TAR.GZ files, type tar -xvzf and press Return or Enter.
- Once extracted, any files and/or folders will appear in the current folder. You can access this folder at the command line in both macOS and Linux, as well as from the desktop in either operating system.
Advertisement
-
7-Zip is a free file archival tool that makes it easy to create and extract TAR, TGZ, and TAR.GZ files in Windows. There are three versions of 7-Zip available for download, and you’ll need to download the correct version for your version of Windows.
- First, find out if your processor is 64-bit, 32-bit, or ARM.
- Press Windows key + S and type about.
- Click About your PC.
- Next to «System type,» you’ll see either «x64-based processor,» «x86-based processor,» or «ARM-based processor.»
- In any web browser, go to https://www.7-zip.org.
- Click the Download link that matches your processor type.
- First, find out if your processor is 64-bit, 32-bit, or ARM.
-
To install the program:
- Double-click the downloaded file ending in .exe—it’ll usually be in your Downloads folder.
- If prompted, give the installer permission to run.
- Click Install.
- Click Close.
-
For example, if your file is in the Downloads folder, you can open File Explorer (just right-click the Start menu and select File Explorer), click This PC in the left column, then click Downloads in the right panel.
-
The easiest way to use 7-Zip is to make it the default program for extracting TAR, TGZ, and/or TAR.GZ files. Here’s how:
- Right-click the file and choose Open With.
- If 7-Zip File Manager appears in the menu, select it. If not, select Choose another app, click More Apps, then select 7-Zip from the list.
-
This instantly displays the contents of the TAR file in 7-Zip File Manager.
-
It’s the blue minus sign at the top of the window.
- If the file you’re opening is a .TAR.GZ or .TGZ file, 7-Zip will first decompress the file and produce a new file ending in .TAR. Then, you can use 7-Zip again to extract the files from the new file ending in .TAR.
-
By default, all files inside of the archive will extract to the current folder. If you want to choose a different location, click the three dots to choose a location now.[4]
-
This unpacks the files from the archive and places them into the selected folder.
- You can now double-click any of the extracted files to open them in their default programs.
-
If your file originally ended in .TGZ or .TAR.GZ, you now have a file ending with .TAR in the current folder. You’ll just need to unpack the archive to access the files inside.[5]
- Right-click the .TAR file and select Open With.
- Select 7-Zip File Manager. Go to Choose another app > More apps if you don’t see it.
- Click Extract.
- Select a location and click OK.
Advertisement
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Thanks for submitting a tip for review!
References
About This Article
Article SummaryX
1. Download the 7-Zip program.
2. Open the 7-Zip program and navigate to your tar file.
3. Select your file, then click «Extract».
4. Choose your extract location.
Did this summary help you?
Thanks to all authors for creating a page that has been read 101,474 times.