Installing cURL from Ubuntu packages provides a dependable command-line client for API checks, downloads, health probes, and scripted file transfers. Keeping the tool under the distro package manager makes it easier to roll into repeatable automation without introducing a separate packaging workflow.

On Ubuntu, apt installs the curl package together with the runtime libraries and certificate bundle it depends on. That keeps the binary path, TLS behavior, and future security updates aligned with the rest of the operating system instead of introducing a second package source.

Commands below assume an Ubuntu host with working package repositories and an account that can run sudo. If curl is already installed, the package step simply confirms the current distro build; if the final HTTPS request fails, the package is present but outbound DNS, proxy settings, or certificate trust still need attention.

Steps to install cURL on Ubuntu:

  1. Refresh the local apt package index before requesting the package.
    $ sudo apt update
    Get:1 http://archive.ubuntu.com/ubuntu noble InRelease [256 kB]
    Get:2 http://archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
    Get:3 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB]
    ##### snipped #####
    Fetched 40.0 MB in 16s (2459 kB/s)
    Reading package lists... Done

    Refreshing metadata first lets apt select the current curl build from the configured Ubuntu repositories without carrying unrelated mirror chatter into the published transcript.

  2. Install the distro-managed curl package.
    $ sudo apt install --assume-yes curl
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    The following additional packages will be installed:
      ca-certificates libcurl4t64
    The following NEW packages will be installed:
      curl
    0 upgraded, 21 newly installed, 0 to remove and 10 not upgraded.
    ##### snipped #####
    Setting up curl (8.5.0-2ubuntu10.8) ...
    Processing triggers for ca-certificates (20240203) ...

    Ubuntu pulls the required TLS and libcurl runtime packages automatically; when curl is already present, apt reports that the newest version is already installed.

  3. Confirm the installed binary path and version.
    $ command -v curl
    /usr/bin/curl
    $ curl --version | awk 'NR==1 { print $1, $2 }'
    curl 8.5.0

    The packaged binary normally resolves to /usr/bin/curl on Ubuntu; the exact version varies by release, architecture, and enabled repositories.

  4. Send a simple HTTPS HEAD request to confirm curl can resolve names, negotiate TLS, and receive a response.
    $ curl --silent --show-error --head https://example.com/
    HTTP/2 200
    content-type: text/html
    accept-ranges: bytes

    --silent keeps the header check readable and --show-error still prints a failure reason if the request cannot complete. If this request fails, the package installation completed but outbound DNS, HTTPS inspection, proxy policy, or CA trust still needs correction before automation can rely on curl.