WGET Command Not Working in Cygwin

31

6

I'm using Cygwin on Windows because some commands in Windows's CMD are not working but working on terminal of OS X and Linux. When I type the wget command and URL, it says command not found. Is there any suggestion to fix this.

enter image description here

Shamal Sandeep

Posted 2013-12-26T13:01:45.960

Reputation: 321

Are others commands, like ls, works fine ? – user2196728 – 2013-12-26T13:05:54.863

@user2196728 I'm completely new to Cygwin so I know just cd command is working – Shamal Sandeep – 2013-12-26T13:13:03.703

Have you tried using curl? – dillmo – 2013-12-30T16:13:14.547

1@dillmo technically he hasn't really even tried using wget, he hasn't even realised that he isn't executing it!! or he has realised it and he hasn't thought to look for wget.exe on his system. I don't think him trying curl would help him! – barlop – 2013-12-30T16:40:48.180

Answers

56

The wget command is not installed by default in Cygwin. To install wget, re-run the Cygwin setup and select the wget package:

wget utility in package list

If wget is selected to install, the screen should look like this:

wget utility selected to install

Click next to complete the installation and run wget using the Cygwin Terminal or Cygwin64 Terminal (if you have installed the 64-bit version).

yjwong

Posted 2013-12-26T13:01:45.960

Reputation: 1 383

1you may find wget under Web instead of Net on newer versions of cygwin – WOUNDEDStevenJones – 2016-03-29T23:48:25.873

As of Windows 10 (version 1803), if you need a HTTP client, curl is now installed by default. On PowerShell, wget is also an alias for Invoke-WebRequest.

– yjwong – 2018-06-21T15:22:37.710

7

Here is an alternative to yjwong's answer, even if it is not a direct answer to your Cygwin problem, it is a Cygwin alternative.

Usually, when i need to take advantage of the power of Linux commands under Windows environnement (for one shot purpose or batch scripting) i don't use an overkill such as Cygwin. I just use UnxUtils.

It provides a lot and main common used Linux commands. These commands run as stand-alone exe files, with no need to install anything on Windows machine.

This is also true if you only need the wget command.

The download link is here.

Trying it often means adopting it, in most cases :)

user2196728

Posted 2013-12-26T13:01:45.960

Reputation: 1 146

1I realize this is old, but I'd just like to point out that if you'd like to be able to run one Linux command line tool on Windows, it's likely that over time you'll want to run others. And while UnxUtils has a fair number of tools, it's just a "very" small drop in the bucket compared to what Cygwin offers. While being native ports in principal makes them faster than the emulation of Cygwin, in practice I've never found performance to be an issue with Cygwin - and unlike UnxUtils, Cygwin offers very exact and complete fidelity with GNU/Linux. – sootsnoot – 2017-07-21T02:45:29.867

it is not working :( – Shamal Sandeep – 2013-12-26T15:01:31.123

what did you try ? open a cmd Windows, then cd to UnxUtils wbin folder, then type wget www.yahoo.com – user2196728 – 2013-12-26T15:02:57.280