To extract .tar.gz, .tgz, .gz as well as .zip files using tar on Windows 10, use these steps:
- Open Start on Windows 10.
- Search for Command Prompt, right-click the first result and select the Run as administrator option.
- Type the following command to use tar to extract the files and press Enter:
tar -xvzf C:\PATH\TO\FILE\FILE-NAME.tar.gz -C C:\PATH\TO\FOLDER\EXTRACTION
To use tar on Linux, you need to install a distro (such as Ubuntu) by enabling the Windows Subsystem for Linux (WSL) using the Windows Features experience, and then installing Ubuntu from the Microsoft Store.
To extract a .tar.gz file using Linux on Windows 10, use these steps:
- Open Start.
- Search for Ubuntu and click the top result to open the app.
- Type the following command to extract the content of .tar.gz file and press Enter:
sudo tar -xvzf /mnt/c/PATH/TO/TAR-FILE/Desktop/FILE-NAME.tar.gz -C /mnt/c/PATH/TO/DESTINATION/FOLDER