Network Tools

curl: command not found

Covers: bash curl command not found · command not found curl — all distros — May 2026

🐧 Ubuntu / Debian 🎩 CentOS / RHEL 🏔️ Alpine 🐳 Docker 🍎 macOS
$ curl -fsSL https://example.com/install.sh | bash
bash: curl: command not found

⚡ Quick Fix by OS

# Ubuntu / Debian / WSL: sudo apt update && sudo apt install -y curl # CentOS 7 / RHEL 7: sudo yum install -y curl # CentOS 8+ / RHEL 8+ / Fedora: sudo dnf install -y curl # Alpine Linux: apk add --no-cache curl # macOS — curl is built-in, if missing: brew install curl

Why Is curl Missing?

curl is pre-installed on most full Linux distributions and all macOS versions. It's missing in these common scenarios:

Fix in Dockerfile

FROM debian:bookworm-slim RUN apt-get update && \ apt-get install -y --no-install-recommends curl && \ rm -rf /var/lib/apt/lists/*

Use wget as Alternative

If you can't install curl but have wget, most curl download commands have a direct wget equivalent:

# curl equivalent: curl -O https://example.com/file.tar.gz # wget equivalent: wget https://example.com/file.tar.gz # curl -L (follow redirects): wget --content-disposition https://example.com/file