• About
  • Contact
  • Cookie
  • Disclaimer
  • Privacy Policy
  • Change the purpose of use

Tnhelearning.edu.vn - Various useful general information portal

  • Photo
  • Bio
  • How To
  • Tech

How to Extract TAR File from Command Line on Windows

January 22, 2024 by admin Category: How To

You are viewing the article How to Extract TAR File from Command Line on Windows  at Tnhelearning.edu.vn you can quickly access the necessary information in the table of contents of the article below.

X

This article is co-authored by a team of editors and trained researchers who confirm the accuracy and completeness of the article.

The wikiHow Content Management team carefully monitors the work of editors to ensure that every article is up to a high standard of quality.

TAR (“.tar.gz,” “.tgz” or “.gz”) is a compressed file format similar to a “.zip” file. This file type is commonly used on Unix-based operating systems such as Linux and macOS. Because it is often used as a normal data storage and compression place, sometimes Windows users will come across and need to extract TAR files. Although you can decompress the TAR file using a third-party application like 7-Zip, it is much more efficient to use the Windows Command Prompt. This wikiHow teaches you how to extract a TAR file using Windows Command Prompt.

Steps

Image titled Extract a Tgz File in Windows from the Command Line Step 1

Image titled Extract a Tgz File in Windows from the Command Line Step 1

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/4/4a/Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-1.jpg/ v4-728px-Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-1.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/ 4/4a/Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-1.jpg/v4-728px-Extract-a-Tgz-File-in-Windows-from-the- Command-Line-Step-1.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output “></div>”}
Click the Windows logo to open the Windows Start menu Windows Start

{“smallUrl”:”https://www.wikihow.com/images_en/0/07/Windowsstart.png”,”bigUrl”:”https://www.wikihow.com/images/thumb/0/07/ Windowsstart.png/30px-Windowsstart.png”,”smallWidth”:460,”smallHeight”:460,”bigWidth”:30,”bigHeight”:30,”licensing”:”<div class=”mw-parser-output “></div>”}

. By default, the Windows logo will be in the lower left corner on Windows 10.

Image titled Extract a Tgz File in Windows from the Command Line Step 2

Image titled Extract a Tgz File in Windows from the Command Line Step 2

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/9/92/Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-2.jpg/ v4-728px-Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-2.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/ 9/92/Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-2.jpg/v4-728px-Extract-a-Tgz-File-in-Windows-from-the- Command-Line-Step-2.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output “></div>”}
Enter CMD . Command Prompt will appear in the Windows Start menu.
Image titled Extract a Tgz File in Windows from the Command Line Step 3

Image titled Extract a Tgz File in Windows from the Command Line Step 3

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/5/59/Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-3.jpg/ v4-728px-Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-3.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/ 5/59/Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-3.jpg/v4-728px-Extract-a-Tgz-File-in-Windows-from-the- Command-Line-Step-3.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output “></div>”}
Right click on Command Prompt Windows cmd

{“smallUrl”:”https://www.wikihow.com/images_en/6/66/Windowscmd1.png”,”bigUrl”:”https://www.wikihow.com/images/thumb/6/66/ Windowscmd1.png/36px-Windowscmd1.png”,”smallWidth”:460,”smallHeight”:383,”bigWidth”:36,”bigHeight”:30,”licensing”:”<div class=”mw-parser-output”: “></div>”}

then select Run as Administrator . Windows Command Prompt has a black screen icon with a white text cursor inside. When you right-click Command Prompt, a context menu will appear. Click the Run as Administrator option at the top to launch the Command Prompt as administrator.

  • You need to be logged in as an administrator to be able to launch the application under this super privilege.
READ More:   How to Increase iPad Battery Life
Image titled Extract a Tgz File in Windows from the Command Line Step 4

Image titled Extract a Tgz File in Windows from the Command Line Step 4

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/5/54/Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-4.jpg/ v4-728px-Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-4.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/ 5/54/Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-4.jpg/v4-728px-Extract-a-Tgz-File-in-Windows-from-the- Command-Line-Step-4.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output “></div>”}
Type tar -xvzf . This is the beginning of the command to extract the “.tar” file. After typing, don’t rush to press “Enter” right away.
Image titled Extract a Tgz File in Windows from the Command Line Step 5

Image titled Extract a Tgz File in Windows from the Command Line Step 5

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/a/a9/Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-5.jpg/ v4-728px-Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-5.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/ a/a9/Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-5.jpg/v4-728px-Extract-a-Tgz-File-in-Windows-from-the- Command-Line-Step-5.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output “></div>”}
Press the Space key and then enter the path to the TAR file. Add a space after the command “tar -xvzf”, then enter the path to the location of the “.tgz” file. For example, if the file is in the “Downloads” folder, you need to enter “C:UsersusernameDownloads”.

  • You can find the file path by going to that file on File Explorer. Proceed to right-click on the address bar at the top and select Copy Address . You should then be able to paste this path into the Command Prompt.
Image titled Extract a Tgz File in Windows from the Command Line Step 6

Image titled Extract a Tgz File in Windows from the Command Line Step 6

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/3/35/Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-6.jpg/ v4-728px-Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-6.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/ 3/35/Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-6.jpg/v4-728px-Extract-a-Tgz-File-in-Windows-from-the- Command-Line-Step-6.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output “></div>”}
Enter the file name. Just after the path, enter the filename. Example: “archive.tgz.”
Image titled Extract a Tgz File in Windows from the Command Line Step 7

Image titled Extract a Tgz File in Windows from the Command Line Step 7

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/0/06/Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-7.jpg/ v4-728px-Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-7.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/ 0/06/Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-7.jpg/v4-728px-Extract-a-Tgz-File-in-Windows-from-the- Command-Line-Step-7.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output “></div>”}
Press the Space key and then type -C . After entering the filename, add a space along with “-C”.
Image titled Extract a Tgz File in Windows from the Command Line Step 8

Image titled Extract a Tgz File in Windows from the Command Line Step 8

{“smallUrl”:”https://www.wikihow.com/images_en/thumb/4/44/Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-8.jpg/ v4-728px-Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-8.jpg”,”bigUrl”:”https://www.wikihow.com/images/thumb/ 4/44/Extract-a-Tgz-File-in-Windows-from-the-Command-Line-Step-8.jpg/v4-728px-Extract-a-Tgz-File-in-Windows-from-the- Command-Line-Step-8.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output “></div>”}
Add a space and enter the path to the location where you want to extract the file. Immediately after “-C”, add another space and enter the path to where you want to extract the file to. For example, if you want to extract the file contents to the “Documents” folder, you need to enter “C:UsersusernameDocuments.”.

  • The entire command should look similar to this: tar -xvzf C:userusernameDownloadsarchive.tgz -CC:userusernameDocuments
  • Image titled Use a Keyboard to Click Instead of a Mouse Step 1

    Image titled Use a Keyboard to Click Instead of a Mouse Step 1

    {“smallUrl”:”https://www.wikihow.com/images_en/thumb/d/de/Use-a-Keyboard-to-Click-Instead-of-a-Mouse-Step-1-Version-3. jpg/v4-728px-Use-a-Keyboard-to-Click-Instead-of-a-Mouse-Step-1-Version-3.jpg”,”bigUrl”:”https://www.wikihow.com/ images/thumb/d/de/Use-a-Keyboard-to-Click-Instead-of-a-Mouse-Step-1-Version-3.jpg/v4-728px-Use-a-Keyboard-to-Click- Instead-of-a-Mouse-Step-1-Version-3.jpg”,”smallWidth”:460,”smallHeight”:345,”bigWidth”:728,”bigHeight”:546,”licensing”:”<div class=”mw-parser-output”></div>”}
    Press ↵ Enter . The contents of the TAR file will be extracted to the folder you specified. [1] X Research Sources[2] X Research Sources
  • X

    This article is co-authored by a team of editors and trained researchers who confirm the accuracy and completeness of the article.

    READ More:   How to Write a Advertisement

    The wikiHow Content Management team carefully monitors the work of editors to ensure that every article is up to a high standard of quality.

    TAR (“.tar.gz,” “.tgz” or “.gz”) is a compressed file format similar to a “.zip” file. This file type is commonly used on Unix-based operating systems such as Linux and macOS. Because it is often used as a normal data storage and compression place, sometimes Windows users will come across and need to extract TAR files. Although you can decompress the TAR file using a third-party application like 7-Zip, it is much more efficient to use the Windows Command Prompt. This wikiHow teaches you how to extract a TAR file using Windows Command Prompt.

    Thank you for reading this post How to Extract TAR File from Command Line on Windows at Tnhelearning.edu.vn You can comment, see more related articles below and hope to help you with interesting information.

    Related Search:

    Related Posts

    How to Create Curved Text in Photoshop
    How to fall asleep faster
    How to Install FBReader to Read eBooks

    Category: How To

    Previous Post: « How to make delicious and flavorful roasted pigeons with coconut water
    Next Post: How to make essential oils for cars »

    Copyright © 2025 · Tnhelearning.edu.vn - Useful Knowledge