Both of these
wget are use for downloading files, etc. Is there any reason to use one over the other?
After you've defined "proper use", use
Why? That's why:
Recursive! wget's major strong side compared to curl is its ability to download recursively, or even just download everything that is referred to from a remote resource, be it a HTML page or a FTP directory listing.
Shameless copied from here
curlis powered by
libcurl– a cross-platform library with a stable API that can be used by each and everyone. This difference is major since it creates a completely different attitude on how to do things internally. It is also slightly harder to make a library than a "mere" command line tool.
curlworks more like the traditional Unix
catcommand, it sends more stuff to
stdout, and reads more from
stdinin a "everything is a pipe" manner.
wgetis more like
cp, using the same analogue.
curlis basically made to do single-shot transfers of data. It transfers just the URLs that the user specifies, and does not contain any recursive downloading logic nor any sort of HTML parser.
curlsupports FTP, FTPS, Gopher, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, POP3, IMAP, SMB/CIFS, SMTP, RTMP and RTSP. Wget only supports HTTP, HTTPS and FTP.
curlbuilds and runs on lots of more platforms than
wget. For example: OS/400, TPF and other more "exotic" platforms that aren't straight-forward Unix clones.
More SSL libraries and SSL support.
curlcan be built with one out of eleven (11!) different SSL/TLS libraries, and it offers more control and wider support for protocol details.
curlsupports public key pinning.
curlsupports more HTTP authentication methods, especially over HTTP proxies: Basic, Digest, NTLM and Negotiate
curlsupports several SOCKS protocol versions for proxy access
curloffers upload and sending capabilities.
wgetonly offers plain HTTP POST support.
HTTP multipart/form-data sending, which allows users to do HTTP "upload" and in general emulate browsers and do HTTP automation to a wider extent
gzipand inflate Content-Encoding and does automatic decompression
curloffers and performs decompression of Transfer-Encoded HTTP, wget doesn't
curlsupports HTTP/2 and it does dual-stack connects using Happy Eyeballs
Much more developer activity. While this can be debated, I consider three metrics here: mailing list activity, source code commit frequency and release frequency. Anyone following these two projects can see that the curl project has a lot higher pace in all these areas, and it has been so for 10+ years. Compare on openhub
wgetis command line only. There's no library.
wget's major strong side compared to curl is its ability to download recursively, or even just download everything that is referred to from a remote resource, be it a HTML page or a FTP directory listing.
wgethas traces back to 1995, while
curlcan be tracked back no earlier than the end of 1996.
wgetis 100% GPL v3. curl is MIT licensed.
wgetis part of the GNU project and all copyrights are assigned to FSF. The curl project is entirely stand-alone and independent with no organization parenting at all with almost all copyrights owned by Daniel.
wgetrequires no extra options to simply download a remote URL to a local file, while
wgetsupports the Public Suffix List for handling cookie domains, curl does not.
wgetsupports only GnuTLS or OpenSSL for SSL/TLS support
wgetsupports only Basic auth as the only auth type over HTTP proxy
wgethas no SOCKS support
Its ability to recover from a prematurely broken transfer and continue downloading has no counterpart in curl.
wgetcan be typed in using only the left hand on a qwerty keyboard!
There are many tools that can download like
HTTrack etc. Use it according to your requirement and which feature you want to use along with downloading.
Check feature table and use accordingly .
- Curl support more protocol FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, POP3, IMAP, SMTP, RTMP and RTSP
- Curl support more SSL libraries
- Curl supports more HTTP authentication methods, especially over HTTP proxies: Basic, Digest, NTLM and Negotiate
- Curl is powered by libcurl -a cross-platform library with a stable API that can be used by each and everyone
- While wget supports HTTP, HTTPS and FTP
- Wget supports only GnuTLS or OpenSSL for SSL/TLS support
- Wget supports only Basic auth as the only auth type over HTTP proxy
- Wget is command line tool only, it has no library.
Important Resources for more info :
They have much functionality in common, but
curl has more options. For
wget it may occasionally be sufficient to leaf through
man wget, but for
curl I need to study this webpage in a browser. I believe anything your browser can do,
curl can do as well.
There's another difference between wget and curl which I think is significant.
Wget is a stand-alone command line utility that's intended primarily for retrieving internet content quickly and simply.
Curl on the other hand is basically a terminal front end for the powerful libcurl library. Libcurl provides a very powerful set of tools for working with URLs in all their forms and flavors, and is available for almost all languages and platforms. Curl basically gives you the ability to use this library in shell scripts.