In this tutorial you will learn how to install the curl command on on Ubuntu 20.04 Focal Fossa

In this tutorial you will learn:
  • How to install curl command
  • How to troubleshoot Command 'curl' not found error
Command 'curl' not found on Ubuntu 20.04 Focal Fossa
Command 'curl' not found on Ubuntu 20.04 Focal Fossa

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Installed or upgraded Ubuntu 20.04 Focal Fossa
Software N/A
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ - requires given linux commands to be executed as a regular non-privileged user

How to install curl command step by step instructions

The following error message may appear on your terminal hinting the unavailability of the curl command:
Command 'curl' not found, but can be installed with:
OR
bash: /usr/bin/curl: No such file or directory
  1. To resolve this issue first try to install the curl command. First and the most obvious installation method is to execute the following command:
    $ sudo apt install curl
    
  2. In case the curl command is still not found check whether the curl binary executable exists:
    $ ls  /usr/bin/curl
    /usr/bin/curl
    
    Check if you can execute the command using a full path:
    $ /usr/bin/curl --version
    curl 7.66.0 (x86_64-pc-linux-gnu) libcurl/7.66.0 OpenSSL/1.1.1d zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.20.2 (+libidn2/2.0.5) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
    
  3. Next, ensure the path to the curl is a part of your executable shell path:
    $ echo $PATH
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
    
  4. Lastly, you may try to reinstall the curl command:
    $ sudo dpkg-reconfigure curl
    

SUBSCRIBE TO NEWSLETTER
Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


ARE YOU LOOKING FOR A LINUX JOB?
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed on LinuxCareers.com.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in: