How do I add a gzip command to Windows CMD?
Asked Answered
S

3

12

On a Mac, if I want to gzip a file, I just type gzip and then the file name. If I do this in windows, it tells me that "gzip is not recognized...".

How do I add this functionality to Windows?

Squinteyed answered 20/4, 2016 at 3:15 Comment(1)
You might find the gzipper npm package very useful.Coremaker
S
41

How to add gzip to CMD

Step 1: Download and install Cygwin

Step 2: Click 'Start' and type System Environment Variables

Step 3: In the 'Advanced' tab, click 'Environment Variables...'

Step 4: In the 'User variables for (user)' section, select the Path variable and click 'Edit...'

Step 5: In the 'Edit environment variable' window, click 'New'

Step 6:

  • For x86 type: C:\cygwin\bin
  • For x64 type: C:\cygwin64\bin

Step 7: Restart CMD, type gzip, and shout, "Wooooo!"


This question has been asked here, but the question and accepted answer are not very straightforward. They assume you know what System Environment Variables are, how to edit them, and what Cygwin is. I wanted to write out clear instructions for anyone that could not figure it out with the current information.

Squinteyed answered 20/4, 2016 at 3:15 Comment(1)
Very nice and easy to understand answer! For those who do not want to use the command line 7zip does the trick tooGahan
B
4

Another alternative is to use chocolatey, a package manager for windows. The instructions to install it are there.

You can then install the gzip package with choco install gzip.

Buber answered 1/2, 2023 at 8:2 Comment(0)
R
0

download gzip from here and run execution file. Then add this "C:\Program Files (x86)\GnuWin32\bin" to environment variable Restart the cmd and run gzip command

Rhatany answered 30/4 at 12:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.