Install, Add wget In Mac OS X Terminal

Even though there are many commercial and freeware download accelerators and managers available for Mac OS X, nothing beats the simplicity of a command line tool like wget. Mac OS X comes with a similar command-line tool called cURL, but for people who are from a Linux/UNIX background, wget would be the preferred tool.

Installing wget on Mac OS X involves compiling it from source. The first step to installing wget is downloading the source from one of the GNU FTP mirrors. You can get the latest version, or any previous version, if you prefer. The source usually comes in a .tar.gz, which you can easily extract by double clicking on the archive in Finder (the Mac OS X Archive Utility handles this).

To start the installation, open, and navigate to the source directory for wget (the one that was obtained by extracting the archive in the previous step), by using the following command:

cd ~/file/directory/wget-versionnumber

Replace ~/file/directory/wget-versionnumber with the directory where you stored the source directory. Once you’re inside this directory, the shell prompt should display the name of the directory. This is confirmation that the previous command worked.

Next, issue the following command:


Note: For all the required dependencies to be correctly resolved, you must have an updated version of XCode installed on your system.

The configure command checks if all dependency requirements are met and configures the appropriate packages for installation. After the configuration process is complete, use the command:



The make command compiles the source code for wget and generates an appropriate binary file specific to your system.

For the final step, you need to do:

sudo make install

To execute this command successfully, you will need to provide the administrator password. This command copies the binaries created during the make step to their appropriate location so that they are recognized by the shell the next time you try to invoke them.

This completes the installation process. To download files using wget, just copy the URL from your browser, and open up, and type:

wget URL

For more information on detailed usage of wget, you can use the command:

man wget

Leave a Reply

Your email address will not be published. Required fields are marked *