4 tools to download Internet files using command line

Learn how to download any file using command line from internet or FTP servers to your Linux server. Get files in your server in seconds!

Learn how to download any file using command line from internet or FTP servers to your Linux server. Get files in your server in seconds!


There are many times when you want a file on your Linux server from Internet or FTP server and you are on command line terminal! When using GUI of Linux, its easy to get file by using browsers but for command line its little bit difficult.

We have 4 tools here to help you with the task! They are

  1. wget
  2. curl
  3. elinks
  4. w3m

wget :

Most popular utility! wget is a package you can install and use it right out of the box. You can install it with yum install wget  (CentOs, RHEL) or apt-get install wget (debian, ubuntu). Once install you can use it with supplying URL of the targeted download.

In above example we have downloaded one picture file from internet! File will be saved in your present working directory by default.

In this example we used wget to download file from FTP server. It used anaonymous login to get into server and download file!

There are several options which you can used according to your requirement. Listing below few important ones.

  • -b : send copy progress in background
  • -c : continue download (breaked or paused donwload resume)
  • -r : recursive (download all files in destination)
  • -A fileextension : download only files with specified extension

curl :

Curl is simple downloader which supports many protocols for file transfer few being ftp, https, https, telnet etc. It can be installed using same above method yum install curl or apt-get install curl.

Curl renders file downloaded to its best known way. Like if you try to download html URl then it will render it and shows you html code on terminal :

See above example where it shows html code of URL. Same way if you get text file it will show you text file content on terminal.

To only download file without trying to read/open it on terminal use option -o with curl.

It will download file and progress will be shown on terminal in real time.

elinks :

elinks is text beased browser which supports colors, rendering, tabbed menus etc. Mostly its preloaded with Installations but if not you can install it using yum or apt-get. Let try to download website using elinks http://kerneltlaks.com :

elinks renders URL

Above example shows elinks renders website in text mode (kind of) on terminal!

If you try to download image (or any type of) file it will show you below GUI screen (within terminal) with options to choose from what to do next. If you choose save then it will download file and keep it.

Image downloading using elinks

w3m :

Last tool of this article to download internet based files is w3m. w3m is text based www (world wide web) client. Installation steps remain same yum/apt-get install w3m

It also opens up text mode GUI screen like elinks and gives you interactive options to choose actions. w3m ftp://rpmf…../…86_64.rpm opens :

w3m download screen

w3m menu
w3m menu


If you right click on terminal window (normally we dont!!) it does show you menu you can use to perform various actions.

You can navigate through this menu using keyboard arrow keys or even using mouse clicks. You can even use short cut keys defined for each menu item in brackets beside them.

All user interactive commands/options are shown in lower left corner of the terminal and choices can be submitted there only.


Author: lamichhane kamal

System administrator Unix. Experinced Author Always with new idea. Contact me If you need help about Linux or windows server.

Leave a Reply

Your email address will not be published. Required fields are marked *

Solve : *
5 × 30 =