Methods of payment Abuse

How to install Curl in Ubuntu

28.08.2021, 22:42

Sometimes it happens that a script generates the following error: bash: curl: command not found. This error means that there is no such command in the system. What is the solution to this problem? You can install the curl utility. It is designed for downloading files. It may not be as popular as wget, but it can provide more features and also has a library that can be connected to other programs. Next, let's see how to install curl on the example of Ubuntu 20.04. But the instruction will be relevant for newer or older versions of the distribution.

How to install Curl in Ubuntu

For example, you decided to initialize install a program with a .sh script. They suggest using curl to load it, it may also end up in the script itself. The problem is that the utility is not installed by default in Ubuntu 20.04. When you try to run the script, you will encounter the error curl: command not found. And if you try to run the utility itself, the message will look like this: bash: /usr/bin/curl: No such file or directory. You should use commands like these to install curl:

$ sudo apt update
$ sudo apt install curl

Once installed, the script containing the curl command should work. To find out the version of the utility run:

$ curl -V

To download the file use the command:

$ curl -OC - https://releases.ubuntu.com/20.04.2.0/ubuntu-20.04.2.0-desktop-amd64.iso

Conclusion

The curl program is widely used. It can be installed on any current desktop operating systems. In Ubuntu 20.04 the utility is not pre-installed, but it is available in the repository and now you know how to install curl Ubuntu. The error we've discussed is most often encountered only on a recently installed distribution. Since the libcurl library is used by a large number of applications and sooner or later will be installed on your system together with curl.