How to Show a Progress Bar in Curl

This article explains how to change the default, text-heavy progress meter in curl to a clean, visual progress bar. You will learn the specific command-line flags required to enable this visual bar, how to apply it during file downloads, and how to configure it as your default setting for all future operations.

By default, when you download a file using curl and redirect the output to a file, it displays a detailed progress meter containing statistics like download speed, total size, elapsed time, and time remaining. While informative, this multi-column layout can be cluttered.

The --progress-bar Flag

To replace the default progress meter with a simple, clean progress bar made of # symbols, use the -# (or --progress-bar) option.

Here is the basic syntax:

curl -# -O https://example.com/file.zip

Or using the long-form equivalent:

curl --progress-bar -O https://example.com/file.zip

When you run this command, curl will display a single-line progress bar that updates in real-time:

######################################################## 100.0%

Making the Progress Bar the Default

If you prefer the progress bar over the default meter for all your downloads, you can make this change permanent by adding it to your curl configuration file.

  1. Open (or create) the .curlrc file in your home directory using a text editor:

    nano ~/.curlrc
  2. Add the following line to the file:

    progress-bar
  3. Save and close the file.

Once saved, curl will automatically use the visual progress bar for all future downloads without requiring you to type the -# or --progress-bar flag every time.