Before proceeding, ensure that “tar” is preinstalled on your Windows computer.

Open the Windows Command Prompt.

Execute the following command when the Command Prompt is opened.

tar --version

If you see the following result, it indicates that you have tar installed. If not, you need to download it on your computer.

To have it installed, click on this link.

After the page has loaded, download the archive containing the binary.

The archive that contains the binary is in the screenshot below.

When the download is finished, extract the zip file, go to the bin directory, and open the bin folder in the terminal. Then, execute the command below in the terminal to confirm it’s working properly.

./bsdtar --version

If you get this result, then you’re on the right track.

Now you need to rename the “bsdtar” binary to “tar”, copy the file, and paste it in the system32 folder.

Close the command line and then reopen it. Next, execute the “tar –version” command to confirm that everything is configured properly.

To extract a .gz file, simply navigate to the directory containing the compressed file in the command line and execute the following command.

Make sure you replace “libarchive-3.6.2,gz” with the name of the file you want to extract.

After extracting the contents of the gz file, display the contents of the current directory to see the extracted files.

Please keep in mind that this method will also be applicable on the Windows PowerShell command line.

Categorized in: