How to Download Files from the Web with Terminal (macOS)

You can download files from the web via your Mac Terminal, to get additional info about your downloads, by using curl -O <URL> command.

This is how it works:

  1. Right-click on the download link/button that has the file you want to download from the web and copy the link (Copy Link Address).
  2. Open your Terminal

Now add the curl -O command, and replace <URL> (don’t include the <>) with the URL link to the file you want to download.

Here’s an example of me downloading the latest version of Unity Hub via my Terminal. First I run the command:

curl -O https://public-cdn.cloud.unity3d.com/hub/prod/UnityHubSetup.dmg

And here’s my Terminal output:

Downloading Unity Hub via Mac Terminal

Your downloaded files will show up in your computer’s Home directory /Users/YourName.

Why would you download files like this as opposed to using a normal web UI?

Your Terminal will provide extra and more precise info, such as file size, download speed, and remaining time. This can be useful if you’re downloading huge files, or if your Internet is unstable. The feedback your Terminal gives you is real-time and more precise.


Has this been helpful to you?

You can support my work by sharing this article with others, or perhaps buy me a cup of coffee 😊

Kofi

Share & Discuss on