Installing cURL on Ubuntu enables scripted HTTP requests, API checks, and automated file transfers directly from a terminal, which simplifies integration tasks and repeatable workflows. The tool is widely used in deployment pipelines, health checks, and diagnostics where lightweight HTTP and other protocol clients are required.
On Ubuntu, the curl binary is provided as a standard apt package and links against system libraries such as OpenSSL and libz, inheriting the distribution’s certificate store and proxy configuration. A separate snap variant exists as a confined package, mounting into locations like /snap/bin and receiving automatic updates through the snapd service.
Choice of installation method influences path resolution and confinement, so scripts that assume fixed locations such as /usr/bin/curl must account for which package is active. Package installation requires access to sudo, and network connectivity, DNS resolution, and a correctly configured certificate store are necessary for successful outbound HTTPS requests.
Steps to install curl on Ubuntu:
- Open a terminal on the Ubuntu system with access to sudo.
$ whoami root
Any unprivileged account that belongs to the sudo group can perform the installation.
- Refresh the Ubuntu package index using apt before installing cURL.
$ sudo apt update WARNING: apt does not have a stable CLI interface. Use with caution in scripts. Get:1 http://ports.ubuntu.com/ubuntu-ports noble InRelease [256 kB] Get:2 http://ports.ubuntu.com/ubuntu-ports noble-updates InRelease [126 kB] ##### snipped ##### Fetched 37.4 MB in 7s (5016 kB/s) Reading package lists... Building dependency tree... Reading state information... 9 packages can be upgraded. Run 'apt list --upgradable' to see them.
Refreshing the package index ensures the latest metadata for the curl package and its dependencies.
- Install the cURL package from the official Ubuntu repositories.
$ sudo apt install --assume-yes curl WARNING: apt does not have a stable CLI interface. Use with caution in scripts. Reading package lists... Building dependency tree... Reading state information... curl is already the newest version (8.5.0-2ubuntu10.6). 0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
The curl package installs the curl binary into the system path, typically at /usr/bin/curl.
- Inspect the installed cURL location and version to confirm that the correct binary is in place.
$ command -v curl /usr/bin/curl $ curl --version curl 8.5.0 (aarch64-unknown-linux-gnu) libcurl/8.5.0 OpenSSL/3.0.13 zlib/1.3 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.7 libpsl/0.21.2 (+libidn2/2.3.7) libssh/0.10.6/openssl/zlib nghttp2/1.59.0 librtmp/2.3 OpenLDAP/2.6.7 Release-Date: 2023-12-06, security patched: 8.5.0-2ubuntu10.6 Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd
The reported version, protocol list, and features confirm a functional build linked against the expected libraries.
- Optionally install the cURL snap package when a confined, auto-updated variant is preferred.
$ sudo snap install curl curl 8.5.0 from Canonicalâś“ installed
Installing both apt and snap variants can cause ambiguity if scripts rely on explicit paths such as /usr/bin/curl or /snap/bin/curl, so only one toolchain location should be assumed in automation.
- Request a test page over HTTPS to confirm that cURL operates correctly with DNS and certificate validation.
$ curl --silent "https://example.com" <!doctype html> <html> <head> <title>Example Domain</title> ##### snipped #####Receiving HTML content without DNS, TLS, or timeout errors indicates a working installation, outbound network connectivity, and a usable certificate store.
Tested on Ubuntu:
| Version | Code Name |
|---|---|
| 22.04 LTS | Jammy Jellyfish |
| 23.10 | Mantic Minotaur |
| 24.04 LTS | Noble Numbat |
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
Comment anonymously. Login not required.
