What is the difference between curl and wget?
The main differences are:
wget
's major strong side compared tocurl
is its ability to download recursively.wget
is command line only. There's no lib or anything, butcurl
's features are powered by libcurl.curl
supportsFTP
,FTPS
,HTTP
,HTTPS
,SCP
,SFTP
,TFTP
,TELNET
,DICT
,LDAP
,LDAPS
,FILE
,POP3
,IMAP
,SMTP
,RTMP
andRTSP
.wget
supportsHTTP
,HTTPS
andFTP
.curl
builds and runs on more platforms thanwget
.wget
is released under a free software copyleft license (the GNU GPL).curl
is released under a free software permissive license (a MIT derivate).curl
offers upload and sending capabilities.wget
only offers plain HTTP POST support.
You can see more details at the following link:
curl vs Wget
They were made for different purposes
wget
is a tool to download files from serverscurl
is a tool that let's you exchange requests/responses with a server
wget
Wget solely lets you download files from an HTTP
/HTTPS
or FTP
server. You give it a link and it automatically downloads the file where the link points to. It builds the request automatically.
curl
Curl in contrast to wget lets you build the request as you wish. Combine that with the plethora of protocols supported - FTP
, FTPS
, Gopher
, HTTP
, HTTPS
, SCP
, SFTP
, TFTP
, Telnet
, DICT
, LDAP
, LDAPS
, IMAP
, POP3
, SMTP
, RTSP
and URI
- and you get an amazing debugging tool (for testing protocols, testing server configurations, etc.).
As many already mentioned you can download a file with curl. True, but that is just an "extra". In practice, use CURL when you want to download a file via a protocol that wget doesn't support.
Actually, the major difference is that curl
includes a library (libcurl
), and that library is widely used by other applications. wget
is standalone.