Linux – the difference between curl, wget and telnet commands

As far as I’m concerned, one can use curl, wget and telnet commands on Linux/Unix machines for the same purpose. What is the general differences between these commands and normal use cases?

Same question is asked on U&L SE that What is the difference between curl and wget?. And differences are:

  • Wget’s major strong side compared to curl is its ability to download recursively.
  • Wget is command line only. There’s no lib or anything but curl Features and is powered by libcurl.
  • curl supports FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, POP3, IMAP, SMTP, RTMP and RTSP. Wget supports HTTP, HTTPS and FTP.
  • curl builds and runs on lots of more platforms than wget.
  • Wget is 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
  • curl offers upload and sending capabilities. Wget only offers plain HTTP POST support.

Telnet

The telnet command is used to communicate with another host using the TELNET protocol. If telnet is invoked without the host argument, it enters command mode, indicated by its prompt (telnet> ) In this mode, it accepts and executes the commands listed below. If it is invoked with arguments, it performs an open command with those arguments.

 

According to its manpage curl is a tool to transfer data from or to a server, using one of the supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP). Practically speaking its a multipurpose tool built off libcurl to communicate with these protocols. In short, you can use curl to script something that sends data to a system or recieve data.

wget is a lightweight, portable utility that downloads files off the internet. Its less ‘swiss army knifelike’ than curl, and only does downloads. It has minimal dependancies unlike curl. There’s alternatives like axel which are threaded and are faster. wget only downloads data, though it can be used for throwing together scripts that access specific URLs – I used it to update a DDNS client over its web based update method for example

Telnet is an unencrypted terminal protocol, whose client just happens to be useful in testing other applications since is speaks ‘raw’ tcp. As such a user can interactively act like another client for testing things like mailservers and irc clients.

Was this article helpful?