Curl is a command-line tool for transferring data to and from servers. This procedure covers Debian and Ubuntu systems that use the apt package manager. Other Linux distributions use different installation commands.

Before you start

Open a terminal or connect to your server using SSH. You need administrative permission to install packages and access to the configured package repositories.

Check whether curl is already installed:

curl --version

If this displays version information, curl is available. If the command is not found, continue with installation.

Update the package index

Run:

sudo apt update

Enter your account password if sudo prompts for it. Wait for the package index update to finish and resolve any reported repository errors before continuing.

Install curl

Run:

sudo apt install curl

Review the proposed package changes and confirm when prompted. Wait for installation to complete.

Verify the installation

Run:

curl --version

The output shows the installed version, supported protocols and enabled features. Available protocols depend on the package’s build configuration.

You can now use curl for tasks such as downloading a file.