How to download a file from a URL using cURL?

To download a file using cURL, you can follow these steps:

  1. Open a command prompt or terminal on your computer.

  2. Run the following command:

curl -O <URL>

Replace <URL> with the URL of the file you want to download. The -O flag tells cURL to save the file with its original filename.

  1. Press Enter, and cURL will start downloading the file. The file will be saved in the current directory.

You can also specify a different output filename by using the -o flag followed by the desired filename:

curl -o <output_filename> <URL>