4

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?

2 Answers 2

8

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.

2
  • telnet is useful as a network testing tool (e.g., telnet mailhost smtp connects to the mail server and so tells you if the path is clear and the server is up). But you should never install the server (the TELNET protocol just sends everything in plain text, so any miscreant en route can intercept your password).
    – vonbrand
    Jan 23, 2013 at 19:22
  • telnet isn't necessary to test port connectivity, the same can be accomplished with curl .... curl -v telnet://8.8.8.8:53 for e.g.
    – slm
    Oct 4, 2023 at 12:13
4

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.

You must log in to answer this question.

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