Axel: Downloads by terminal better than with wget

We have already seen how to download files from the internet through our terminal, using wget … But, wget is unfortunately not perfect.

When we download a file with wget, it (wget) starts downloading it using a single request, that is, a single download thread. However, sometimes we want to download the same file using multiple threads.

That is (and explaining in a simpler way) ...

We start to download a file using only 1 thread (path, request), and if for some reason we have some kind of speed restriction, or any limitation that our "nice and honest" ISP has decided to configure, we will have the limitation right there ... it will bother us until we cannot.

Meanwhile, if we use several download paths / threads (let's say 10 or more), well… we will see how the download speed is higher than what we would have had if only 1 thread had been used.

The problem is that wget does NOT support multi-threaded downloads, at least I haven't found a way to do this, and this is where it comes in Axel 😀

Axel allows you what wget does not, download the same file using several threads.

For example, to download: http://ftp.desdelinux.net/netbeans-7.1.2-ml-linux.sh we put in a terminal

  • axel -n 10 http://ftp.desdelinux.net/netbeans-7.1.2-ml-linux.sh

 

An example screenshot:

Obviously, before using it you have to install it 😀

To do this, in distros such as Debian or based on it (Ubuntu, Mint, LMDE, SolusOS, etc.) it is installed with:

sudo apt-get install axel

In Arch:

sudo pacman -S axel

You can read the help of ax by putting:

man axel

And well here the post ends 🙂

I hope it has been useful 😀


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

29 comments, leave yours

Leave a Comment

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

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Algabe said

    Very good ... I'm already testing it. thanks!! 🙂

    In Fedora:

    sudo yum install axel

  2.   proper said

    When I used Slackware I used it for a while but I always had problems downloading isos and movies, the MD5s were always different and trying to record the isos gave problems halfway.

    In Fedora I still don't test it.

    1.    KZKG ^ Gaara said

      So far I am as happy as a child in a candy store 😀

  3.   jamin-samuel said

    Wao did not know this O_O

    Thank you KZKG ^ Gaara

    1.    KZKG ^ Gaara said

      A taste 🙂

  4.   tammuz said

    I had no idea either

  5.   linux sucks said

    Linux sucks, only geeks and hackers use it!

    1.    Hugo said

      Probably true. Linux is not the ideal system for idiots 😉

    2.    MecateSL said

      Definitely ... this is pure filth ... there is no virus, the system never crashes, I have everything a couple of clicks away ... where is the complicated and problematic of serious OS !!! I miss the winbugs ...

      -Hey you. Why haven't you raised your hand?
      -Because I don't use Windows.
      The professor, surprised, asked again:
      -Well, if you don't use Windows, what operating system do you use?
      -GNU / Linux. -He replied proud-
      The professor, whose fanatical ears could not believe such a thing, exclaimed:
      -But my son, what sin have you committed to use such botch?
      The student, very calm, replied:
      -My father is a computer scientist and uses OpenSuse, my mother is a security consultant and uses Debian Linux and my brother studies Physics and uses Linux Mandrake, that's why I also use GNU / Linux! -he finished proud and convinced-
      "Well," the professor replied irritably, "but that's no reason to use Linux." You don't have to do what your parents do. For example, if your mother was a prostitute and took drugs all day, your father touched his balls, drank like a bastard and dealt drugs and your brother robbed shops and robbed grannies, then what would you do?
      - Surely install Windows !!!

      1.    elav <° Linux said

        Great joke, I had already seen it hahaha.

  6.   sieg84 said

    ever use it to lower an ISO
    I never used it again

  7.   sieg84 said

    ever use it to lower an ISO
    I never used it again ...

  8.   Manuel de la Fuente said

    Some time ago I tried Axel in Pacman on the recommendation of a tutorial that I found out there, and nothing, I removed it the same day. Now the details of why escape me, but after trying various configurations, in all cases it took much longer to update with it than without it.

    On another topic, yesterday I was waiting all day for an entry regarding the anniversary of the blog ... and of course, the new design (I'll be bothering you until you put it: D).

    1.    KZKG ^ Gaara said

      Regarding the new theme, it is not even remotely finished ... it has been more complicated than we think, especially when we are thinking about some changes in the design.

  9.   pardinho10 said

    eh and where are the downloaded files saved =?

    1.    diazepan said

      In the directory where you are executing the axel

    2.    KZKG ^ Gaara said

      Exact 🙂
      If in the terminal you are located in / home / your-user / Documents… there in Documents the file will be downloaded.

  10.   msx said

    Dear @ KZKG ^ Gaara, I would like to add to your note a description of lftp, in my opinion the definitive tool for segmented downloads from the command line, far superior to the rest.

    I had stopped using axel because the skinny guy who did it had stopped updating it, he only made minor fixes from time to time.
    When reading your post, I went directly to axel's website [0] and I found two pleasant news:
    1. axel is now maintained by someone else, which means that the project did not die and will surely update the application. (this is the less relevant news of the two)
    2. the creator of axel is also the creator of BitlBee [1], plain AWESOME!

    For those of you who don't know BitlBee, the app is a server that runs in the background like a daemon and makes it possible to unify all of our IM (instant messaging) accounts on one IRC channel, which is a perfectly cool nerd.
    For example, I usually have a WeeChat [2] session open in a tab in Yakuake (obviously they can use whatever IRC client they want: Irssi, Konversation, Quassel, Kvirc, X-Chat, Pidgin, mIRC, whatever they want), from the same WeeChat I connect to the local BitlBee server (yes, BitlBee servers can also be created on the net to serve different types of users, totally awesome) with which, when I connect to the BitlBee server, it automatically begins to log me into All the messaging services that I have registered, so I don't need to use a graphical application to be connected online [3] and what is much better, I use WeeChat (of which I am a fan) for all my online communication. WeeChat allows you to use many types of plugin to notify about incoming messages, for example Growl [4], which is the same internal messaging system used by MacOS.

    But hey, I left the subject a little bit.
    When axel development had stopped, I kept looking and found the application that in my humble understanding is the father and mother of all console download managers in GNU / Linux: lftp. [5]
    lftp is simply IM-PRE-SIO-NAN-TE, it is not only a download manager, it is a complete interface for multiprotocol FTP / HTTP downloads designed for segmented downloads, with job management capabilities (similar to the job queue of BASH), parallel file transfer (with the corresponding multisegmentation / mirrored for each one), continuation of failed or cut downloads, secure login with credentials to FTP sites (axel does not support credentialed login to FTPs) and many more features than They make the king of download managers.
    In addition, it is the lightest of all the multi-segment download managers (yep, lighter than axel still) and allows us to squeeze the connection down to the last bit, so that if we configure the download to use absolutely all of our bandwidth ( and as long as the origin allows it) lftp will download at the maximum possible speed of our connection - be careful that we may not have any remaining band to navigate!
    lftp is a tremendously powerful tool although I use it for now only to download files to the maximum of my connection. For this I created this alias so I don't have to type the entire instruction every time I download something:

    alias L = 'lftp -e »' pget -n20 ′

    The download instruction would be: $ L {url_completa_del_file_to_download}; quit '
    The semicolon is to end the previous instruction block as it is done in Bash, then I tell it to end its execution with quit and close the entire instruction with a final check mark.
    Obviously read the lftp man page to see what -e, pget, -n, etc. does.

    Finally: there is only one more tool that I verified has the same efficiency as lftp and it is the extension for Fiefox DownThemAll: just like lftp it has an extraordinary speed to download files from the net and the best thing is that, also like lftp, It does not have a speed cap, it always tries to download at the maximum speed that our bandwidth allows.

    Greetings and I hope these apps serve you.

    [0] http://wilmer.gaa.st/main.php/me.html
    [1] http://www.bitlbee.org/main.php/news.r.html
    [2] http://weechat.org/
    [3] http://www.centerim.org/index.php/Main_Page
    CenterIM is a multiprotocol instant messaging client designed to run especially from the console.
    [4] http://growl.info/
    [5]

    1.    elav <° Linux said

      Very interesting ...

    2.    Diavolo said

      Interesting, I was thinking of trying axel, but from what you're saying I think I'll try lftp first.

  11.   sieg84 said

    @ Pardinho 10 where you are located (terminal) when using axel

  12.   Diavolo said

    wow I was thinking of installing it on my Slackware, but I just realized that ... I already had it installed by default 🙂, now I just have to try it 😀

  13.   julio74 said

    I went to download a file and it came out like this, I only show the last part since it swallowed almost the entire terminal:
    [0%] ………. ………. ………. ………. ………. [201,1KB / s]
    [0%] ………. ………. ………. ………. ………. [201,4KB / s]
    [0%] ………. ………. ………. ………. ………. [201,8KB / s]
    [0%] ………. ………. ………. ………. ………. [202,1KB / s]
    [0%] ………. ………. ………. ………. ………. [202,4KB / s]
    [0%] ………. ………. ………. ………. ………. [202,7KB / s]
    [0%] ………. ………. ………. ………. ………. [203,1KB / s]
    [0%] ………. ………. ………. ………. ………. [203,4KB / s]
    [0%] ………. ………. ………. ………. ………. [203,7KB / s]
    [0%] ………. ………. ………. ………. ………. [204,0KB / s]
    [0%] ………. ………. ………. ………. ………. [204,3KB / s]
    [0%] ………. ………. ………. ………. ………. [204,6KB / s]
    [0%] ………. ………. ………. ………. ………. [204,9KB / s]
    [0%] ………. ………. ………. ………. ………. [205,2KB / s]
    [0%] ………. ………. ………. ………. ………. [205,0KB / s]
    [0%] ………. ………. ………. ………. ………. [202,0KB / s]
    [0%] ………. ………. ………. ………. ………. [203,6KB / s]
    [0%] ………. ………. ………. ………. ………. [205,2KB / s]
    [0%] ………. ………. ………. ………. ………. [205,5KB / s]
    [0%] ………. ………. ………. …….
    pthread error !!!
    pthread error !!!

    and I don't download anything and he executes like this

    brokerer @ linux-elite: ~> axel -n 10 ftp://ftp.snt.utwente.nl/pub/games/urbanterror/full_install/linux_or_mac/UrbanTerror411.zip
    Initializing download: ftp://ftp.snt.utwente.nl/pub/games/urbanterror/full_install/linux_or_mac/UrbanTerror411.zip
    File size: 1074190065 bytes
    Opening output file UrbanTerror411.zip
    Starting download

    I still downloaded the file with wget and it went well but I would like to know what happened

  14.   Amiel said

    Very interesting, I have a question, with wget I could never get very far since in Linux Mint 13 Maya I never found the .bashrc file and there are several things that I need to configure, add an alias etc, on other Ubuntu PCs I have tried to do some things with wget, as long as I am going to download something from the domain from the local network, no problem, but whenever it is another URL it gives me authentication error with the proxy server, I need to know definitely what I should do to add, configure (I imagine it is something in the .bashrc) and definitely leave my username or passwd for when I go to download something using the terminal, don't give me that error again, I hope someone throws me a line. Thank you all, the site is very good 🙂

    1.    KZKG ^ Gaara said

      In the last case you can configure / etc / wgetrc ... look in that file where it says proxy, there you will see the options 😀

  15.   Amiel said

    I have seen it, I have tried to configure it but it makes me a little uncomfortable, I understand the language perfectly, that is not a problem, however it keeps giving me an auth error.? 🙁
    I'm going to try from start again, I also want to do something similar with axel, which I see here is very good. And I really need from time to time to download the odd file from the web, and nothing better than to do it in the geek style, and more Pro, than the terminal ... I love bash too!

    Well brother thanks anyway.

  16.   gilberto said

    What kind of files is it capable of downloading? How do I download from a server? eg putlocker?

  17.   Hugo said

    good contribution, it is also very fast.

  18.   Nandor said

    A million thanks!