June 16, 2026

Shell yeah, the comments exploded

TIL: You can make HTTP requests without curl using Bash /dev/TCP

Tiny container, giant chaos: people can’t stop arguing over Bash’s secret web trick

TLDR: Bash has a hidden trick that can send a basic web request even when a tiny app container doesn’t include curl or wget. Commenters were split between “cool emergency hack” and “dangerous clown move,” with the real drama coming from people arguing over whether Bash is clever or just being misused.

A humble little tip about checking whether one app can reach another inside a stripped-down container somehow turned into catnip for the comments section. The trick? If a tool like curl isn’t installed, Bash can still open a raw connection and let you type out a simple web request by hand. For the original poster, it was a practical lifesaver: no extras, no downloads, just a quick way to ask another service, basically, “Are you alive?”

But the community immediately split into two camps: Team ‘wow, neat hack’ and Team ‘absolutely not in production, please step away from the keyboard’. One commenter cheered, “That’s pretty neat,” while another gleefully tested it on example.com like they’d just discovered fire. Then came the buzzkill energy, and honestly, it was glorious. Critics pounced on the wording, saying Bash does not “speak web” — it merely opens a socket, and you are the one doing the awkward manual talking. Others warned this is exactly the kind of clever shortcut that becomes tomorrow’s “why is everything broken?” meeting.

The funniest part is how deeply people got into the weeds over a tiny convenience trick. What started as a bare-bones workaround became a full-on comment battle over standards, safety, and nerd pride. The vibe was equal parts useful survival tip, pedantic correction fest, and I can’t believe this actually works.

Key Points

  • The article shows how to use Bash’s `/dev/tcp` redirection to open a raw TCP socket and manually send a simple HTTP request from a minimal container.
  • A request can be sent by assigning the socket to a file descriptor with `exec 3<>/dev/tcp/host/port`, writing the HTTP request with `printf`, and reading the response with `cat`.
  • `/dev/tcp` is not a real device file; it is an internal Bash redirection feature that performs DNS lookup and socket connection handling.
  • The `Connection: close` header is important in the example because HTTP/1.1 keeps connections open by default, which can cause reads to hang.
  • The method only supports plaintext HTTP, is Bash-specific rather than POSIX-compliant, and may be unavailable on systems where Bash was built without network redirections.

Hottest takes

"please use curl ... for contacting remote services" — AndrewStephens
"No, it can not. Bash lets you open TCP sockets." — basilikum
"Neat, works against example.com" — simonw
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.