There's no wget command. How do I get it?


Alternatively, if you don't need wget specifically, Snow Leopard does come with curl which does many of the same things.

E.g., fetching your flair via wget:

wget http://apple.stackexchange.com/users/flair/2726.png

vs. fetching it with curl:

curl -O http://apple.stackexchange.com/users/flair/2726.png

Notably lacking from curl is wget's --mirror option, but it does have nifty fetching with patterns, which handles many of the same problems:

# Fetch flair images for users 2726 through 2730
curl -O http://apple.stackexchange.com/users/flair/[2726-2730].png

You will need to install Xcode with Unix Dev Support, then you can download and compile the source, or try macports, or homebrew.

$ brew install wget

$ sudo port install wget

Or you could try a graphical form which includes wget, like http://www.macupdate.com/app/mac/24787/cocoawget

  • I have Xcode installed, but where can I get the unix dev support? Could you give me step by step instructions ?
    – Strawberry
    Apr 23 '11 at 6:36
  • img59.imageshack.us/img59/6490/capturadepantalla201004pd.png When installing xcode there should be a checkbox, just run through the installer again. The next part is installing either macports or homebrew github.com/mxcl/homebrew macports.org/install.php either of these package managers will allow you to download wget with ease once their are installed. Apr 23 '11 at 12:10
  • Call me dumb, but do you have to pay the annual $99 fee to be part of the Mac Developer program to get Xcode? Apr 24 '11 at 10:31
  • You are not dumb at all, unfortunately apple changed around xcode 4 so its either 5 bucks for the package or 99 to be in the dev program. Its annoying because all we want are the OSS headers and stuff. But if you have your original os x dvd you can install xcode right off of there. guide.macports.org/chunked/installing.xcode.html Apr 24 '11 at 13:09
  • Just as a note - this changed back very soon after so you don't need to pay
    – mmmmmm
    Jul 16 '21 at 9:32

To expand on Michael Granger's answer: curl (included on all Snow Leopard installs) is really quite powerful, and can do a lot of what wget does (and a number of things it doesn't).

But, as noted on the curl FAQ:

1.3 What is curl not?

Curl is not a wget clone. That is a common misconception. Never, during curl's development, have we intended curl to replace wget or compete on its market. Curl is targeted at single-shot file transfers.

Curl is not a web site mirroring program. If you want to use curl to mirror something: fine, go ahead and write a script that wraps around curl to make it reality (like curlmirror.pl does).


(For reference, here's that curlmirror.pl script)


If you don't want to use either homebrew or macports there is a great set of instructions here, reproduced below (using a slightly more up-to-date version of wget).

These instructions require both Xcode and the command line tools to be installed.

First, use curl to download the latest wget source :

curl -O http://ftp.gnu.org/gnu/wget/wget-1.14.tar.gz

Next we use tar to uncompress the files you just downloaded:

tar -xzf wget-1.14.tar.gz

Use cd to change to the directory:

cd wget-1.14

Configure with the appropriate –with-ssl flag to prevent a “GNUTLS not available” error:

./configure --with-ssl=openssl

Build the source:


Install wget, it ends up in /usr/local/bin/:

sudo make install

Confirm everything worked by running wget:

wget --help

Clean up by removing wget source files when finished:

cd .. && rm -rf wget*

Probably the easiest and painless way to get wget is to install Homebrew. In fact, the very home page says:

Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn't include with OS X.

and their example is:

$ brew install wget


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .