wget is basically to retrieve HTTP contents from web servers. I want to know if wget is based on TCP or UDP? I did a search but some resources said it is TCP while others said UDP.


By default, wget uses HTTP to retrieve files. Which means wget uses TCP/80... unless you specify HTTPS, in which case it uses TCP/443.

  • Or the URL explicitly includes the url, but yes, it's always TCP.
    – Ricky
    May 15 '16 at 1:54
  • @rickyBeam Had to re-read that a few times. Did you mean the URL explicitly includes the port?
    – Eddie
    May 15 '16 at 3:06
  • It can... hxxp://www.example.com:8080/ or hxxps://www.example.com:8443/ Even hxxp://www:443/ and hxxps://www:80/ are legal URLs.
    – Ricky
    May 15 '16 at 6:44
  • @RickyBeam Yes, I understand that ;) I was just trying to understand your typo. ^_^
    – Eddie
    May 15 '16 at 15:01

From the wget manpage:

GNU Wget is a free utility for non-interactive download of files from the Web. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies.

HTTP, HTTPS, and FTP are all TCP protocols (and respectively use default TCP ports 80, 443, and 20/21). Therefore the answer to your question is: wget uses TCP.

Any source that could have said that wget uses UDP is plain wrong. Since UDP is a connectionless, unreliable, not-acknowledged protocol, it is unfit for file transfer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.