How to extract a tar file (.tgz) in windows? Is this possible, or do I have to get into a linux environment and extract it?
No, you don't need Linux, you can download a free tool like 7zip which is more than capable of extracting
And, on the assumption that you're writing batch files to do this extraction (since this is a programming site rather than a general tools help forum), it has a nice command-line interface so that you don't have to worry about GUI rubbish.
Cygwin contains the necessary tools, of course. It's overkill just to unpack one tarball, but if you like the Linux command line tools, Cygwin is well worth installing.
Using Cygwin you can unpack a tgz (zipped tar) file like this:
tar -xzf foo.tgz
(which means extract zipped file)
You can also drag and drop the tgz file to the cygwin terminal window in order to get the path right. For drive C: it will look like this:
tar -xzf /cygdrive/c/the/path/to/your/file/foo.tgz
You can also use WinRAR to extract
.tar.gz files however WinRAR is not a free software.
I always have the UnxUtils GNU utilities in my
PATH on a Windows box.
gunzip programs, among other things one can't live without after getting used to a Unix shell.
I use Universal Extractor I use that and 7-Zip for a lot of things.
You can check out the gow project. It provides a nice list of Unix utilities on Win32 system. Works quite well.
Since Windows 10 version 1803 Windows includes
bsdtar (see https://devblogs.microsoft.com/commandline/windows10v1803/.
bsdtar is available with
tar in CMD and Powershell.