How To Download Files From The Internet Through Shell (Terminal) Using Curl In Git Bash | Windows, Mac, Linux, Unix, Chrome OS

Follow Us on Social Media

How To Download Files From The Internet Through Shell (Terminal) Using Curl In Git Bash | Windows, Mac, Linux, Unix, Chrome OS

How To Download Files From The Internet Through Shell (Terminal) Using Curl In Git Bash | Windows, Mac, Linux, Unix, Chrome OS


As much as you can navigate to a webpage, look for a file on the web page and download such file, you can also download internet files, web pages and source codes through the Command Line Interface (CLI).


A stock CLI usually comes preloaded with almost every OS. 

The stock CLI on Windows, is the Windows command (cmd.exe).

While for MacOS and Linux, you can access the shell through the terminal, this is not so on Windows.

For Windows, you need access to the shell through a terminal called git bash.

There are other such CLI's available for Windows windows. Another popular one is the cygwin terminal.

To download a file via shell in Windows, Mac, Linux, Unix or any other operating system, you'll need to use the curl command.

The 'curl' command which means 'see uniform resource locator', can be used to download internet files, web pages or view web source codes.

To download a file, enter the following command in your terminal:

curl -o filename.ext -L fileurl


Replace 'filename.ext' with the name you wish to save the file, and 'fileurl' with the exact location of the file on the internet.




No comments



Powered by Blogger.