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 --versionIf this displays version information, curl is available. If the command is not found, continue with installation.
Update the package index
Run:
sudo apt updateEnter 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 curlReview the proposed package changes and confirm when prompted. Wait for installation to complete.
Verify the installation
Run:
curl --versionThe 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.