Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Microsoft has been shipping curl.exe for a while as well, though not the library.

I'm not sure if this is accurate. Why do they include a default alias in Powershell for `curl` that points to the `Invoke-WebRequest` cmdlet then?

I've always installed curl myself and removed the alias on Windows. Maybe I've never noticed the default one because of that.



As of one of the later releases of Windows 10, "curl.exe" is in System32 (or somewhere else on PATH), but if you type "curl" in a powershell you get the alias. You need to type "curl.exe" to get the binary.

Guessing this is for backwards compatibility with scripts written for the days when it was just PowerShell lying to you.

https://curl.se/windows/microsoft.html


curl.exe does ship with Windows. Given a Windows 11 ISO freshly downloaded from microsoft.com, we have

  $ 7z l /Volumes/CCCOMA_X64FRE_EN-US_DV9/sources/install.wim | egrep ' 1/Windows/Sys.*/curl.exe'
  2024-09-06 00:02:14 ....A       672312       343918  1/Windows/System32/curl.exe
  2024-09-06 00:02:14 ....A       585160       323710  1/Windows/SysWOW64/curl.exe
This is, in fact, curl:

  > C:\Windows\System32\curl.exe --version
  curl 8.9.1 (Windows) libcurl/8.9.1 Schannel zlib/1.3 WinIDN
  Release-Date: 2024-07-31
  Protocols: dict file ftp ftps http https imap imaps ipfs ipns mqtt pop3 pop3s smb smbs smtp smtps telnet tftp
  Features: alt-svc AsynchDNS HSTS HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM SPNEGO SSL SSPI threadsafe Unicode UnixSockets
My personal favorite *nix utility nobody knows ships with Windows is tar.exe, which is libarchive's bsdtar and therefore supports a wide variety of archive formats.

["1/…" is 7z syntax for the first image in the WIM file — Windows 11 Home, in this example — included here to avoid redundant output; curl.exe is included in all images.

"…/SysWOW64/curl.exe" is a 32-bit curl build (32-bit Windows programs see "Windows\SysWOW64" as "Windows\System32").]


> My personal favorite *nix utility nobody knows ships with Windows is tar.exe, which is libarchive's bsdtar and therefore supports a wide variety of archive formats.

TIL. However, some caveats: https://github.com/libarchive/libarchive/issues/2092




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: