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

This article explains how to perform HTTP requests using Bash's built-in /dev/tcp redirection feature. It provides a practical solution for environments where standard tools like curl or wget are unavailable.
Why it matters
It offers a useful troubleshooting technique for system administrators and developers working in minimal containerized environments.
I needed to check that one container could reach another over an internal Docker network: a plain GET /health against a service on a shared network. The obvious move is curl http://service:8642/health . But this app image was stripped right down, with no curl or wget and nothing else around that I could use to open a socket.
Technical tutorial with no political or social agenda.
Get smarter about the news
Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.
Create free accountAlready have an account? Sign in