Software Development

Software Development, software engineering , computer science

The best command line download utility [ aria2 ]

Yes, this is a good idea to drop a post about. What is my personally favourite told to download files on any terminal/command line.
There is no doubt about it always go with aria2, ok there are very rare cases I need to use wget.

aria2 is the best too you can have, it can download everything, you name it (even magnet links faster than any client).
Anyway, we are not here about to talk about downloading any illegal copyrighted torrent files, I’m just saying it can, and does it fast.
I strongly recommend you reading its documentation before you say it’s useless.

Just an example let’s say you want to download a t0rr3nt file. Probably 99% you will end up with an error message, it’s all because you don’t know the command.
Ok here is the right one [the magnet link goes between those “”]:
aria2c –enable-dht=true “magnet:?xt=urn:btih:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
This will work, but if you ever attempt such things, do not forget about encryption! Encrypt the whole payload using ARC4.

OK, I already crossed the line with the stuff above there are actually totally other reason why I am using it. Just few really common once:

  • HTTP/FTP/SFTP Options
  • HTTP Specific Options
  • FTP/SFTP Specific Options
  • Metalink Specific Options
  • RPC Options
  • URI, MAGNET, TORRENT_FILE, METALINK_FILE
  • Resuming Download
  • Event Hook
  • aria2 is the download utility I am using on command line.
    aria2 On Black Duck Open Hub

    for example, on my mac I have created aria2.conf file under /Users/yourusername/.aria2/aria2.conf and added the following line.
    file-allocation=trunc instead of file-allocation=none.

    You can add many useful things. Soon, I will add a list in my next post.

    Using trunc seemingly allocates disk space very quickly, but what it actually does is that it sets file length metadata in file system, and does not allocate disk space at all. This means that it does not help avoiding fragmentation.

    How to Enable and Disable Root Login in Ubuntu [for those 32 individuals asked this in the last 12 months]

    OK, well, this is not one of those post I’d like to publish, but just counted how many time people asked this question in the last 12 months. I found 32 emails.
    I’ll give you the simplest, permanent UNSAFE solution. Use this if you need after finishing you server installation.DO NOT LEAVE ENABLED ON A LIVE RUNNING SERVER.
    There are options to enable it temporarily, or set and expire time.
    Be safe!

    How to login and connect to NordVPN on Ubuntu Server

    Installing the latest NordVPN by opening the terminal, writing the command below, and following any on-screen instructions:

    sh <(curl -sSf https://downloads.nordcdn.com/apps/linux/install.sh)

    Note: If you do not have a curl package, evidenced by the fact that the above does not work, you can alternatively use this command:

    sh <(wget -qO - https://downloads.nordcdn.com/apps/linux/install.sh)

    Additionally, if you receive the following issue:
    Whoops! Permission denied accessing /run/nordvpn/nordvpnd.sock, all you need to do is write the following command:

    sudo usermod -aG nordvpn $USER # and then reboot your device.

    After installing NordVPN Linux Client you might get the following message when you try to login “nordvpn login”:
    Continue in the browser

    server@server:~$ nordvpn login
    Continue in the browser: https://zwyr157wwiu6eior.com/v1/users……

    There is a simple solution:
    nordvpn login –legacy

    server@server:~$ nordvpn login –legacy
    Please enter your login details.
    Email:

    or even:
    nordvpn login –username username –password password

    2021 Updated! Install WordPress on Ubuntu Server with add-on features as HTTPS support, SSL certificate and HTTP2 supports

    If we carefully followed all my steps above , you should have a running wordpress page by now.
    You might need to run as the wordpress uses php file extensions.
    sudo rm -rf /var/www/html/index.html

    Enable HTTPS supports:

    Create a ssl-params.conf file and add the following definition below to it, then save it.

    Next thing to do is create a backup of the original default-ssl.conf file.

    Then modify it accordingly, we are deploying a wordpress site in this particular example we use the following adjustments.

    Enable HTTP2 supports:

    It is also recommended adding strong ciphers for Apache to increase SSL Security on the server.
    Part of my Best Practices to deploy a secure webserver, virtual personal server or database serve is to add the recommended ciphers from SSL Server Test.

    How to Enable HTTP2 in Apache 2.4 on Ubuntu

    Valgrind 3.16.0 for MacOS Mojave 10.14.6

    After many unstable versions and unsuccessful tries found a working but still experimental solution for MacOS Mojave 1.14.6 using homebrew. This solution also working with Qt5.14.1 using QtCreator 4.11.2 on Mojave 10.14.6.

    My conclusion after carry out some analysis on some of my cross platform projects, simple and more complicated once. This solution works on simple projects, however as the complexity increases the results are totally unpredictable.

    I’d like to emphasise that after comparing my results, I still NOT recommend to rely on results running Valgrind on MacOS, found fairly high number of critical errors and false positives. My results based on comparing the two following development environments:

    – MacOS Mojave 10.14.6, Valgrind 3.16.0, Qt5, gcc, clang
    – Ubuntu 18.04, Valgrind 3.16.0, Qt5, gcc, clang