HOW TO DOWNLOAD TORRENT FILES FROM THE COMMAND-LINE ON LINUX

Downloading files on the Linux is very easy, you can use wget command to download the files using the Linux command-line. In case, you need to download the torrent files, you need to make use of a third-party tool Aria2. The Aria2 make it possible for the users to download the torrent files as well as magnet links.

Installing Aria2 on Linux

Aria2 is a reliable torrent client that supports FTP, HTTP, SFTP, and other protocols. It is available on most of the Linux distributions including Debian, Ubuntu, Arch Linux, Fedora, and OpenSUSE etc. To download Aria2 on command-line you need to follow a few simple steps.

Installing Aria2 Source for Ubuntu

For Ubuntu, Aria2 is available for installation in Universe repository. If the Linux distribution you are using does not contain Universe, then the first thing you need to have is Universe, Use add-apt-repository command for adding universe.

sudo add-apt-repository universe

Run the update command to set up the repository on Ubuntu.

sudo apt update

Now you can install aria2 using

sudo apt install aria2

 

Installing Aria2 on Debian

For Debian, Aria2 is available in the Main repository, use apt-get to install Aria2.

sudo apt-get install aria2/pre<>

Installing Aria2 on Arch Linux

For Arch Linux, you can install Aria2 in the Community repository, make sure that the Community repository is enabled in the directory /etc/pacman.conf and use pacman package manage to install Aria2.

sudo pacman -S aria2

 

Installing Aria2 on Fedora

For Fedora, the Aria2 is in primary Linux software sources so you can easily get it by DNF command

sudo dnf install aria2 -y

 

Installing Aria2 on OpenSUSE

For OpenSUSE, Aria2 is available in the OSS repository, use the Zypper package manager to download Aria2

sudo zypper install aria2

 

Installing Aria2 on Generic Linux

In Generic Linux, you can find the Aria2 downloader from the developer’s website and make use of the official documentation to install. You can get Aria2 for Generic Linux from here.

 

Downloading torrents from the command-line using Aria2

Aria2 is a multi-threaded download manager, all you need to get the torrent file or the magnet URL to start downloading by using the given syntax:

For magnet link you need to simply place the magnet link with aria2c.

aria2c 'magnet-link'

OR

aria2c 'torrent-file-web-link'

In case you want to use the torrent file, there is no need to place the single quotation marks (inverted commas).

aria2c -T /location/file-name.torrent

Downloading Torrent File with Aria2

It will download the file in the directory where you run the command. It is also possible to download multiple torrents at the same time using the touch command to create a text file.

touch ~/aria2-torrents

Use echo command and add the torrent magnet links or torrent file links to the aria2-torrents text file. Just make sure to replace the torrent link with the Magnet link or Torrent file location with torrent name.

 

echo 'torrent 1' >> ~/aria2-torrents

echo 'torrent 2' >> ~/aria2-torrents

echo 'torrent 3' >> ~/aria2-torrents

 

After you are done adding the torrent files, start downloading with:

aria2c -i ~/aria2-torrents

After all the torrent are downloaded completely, you can clear the torrent text file.

echo ' ' > ~/aria2-torrents

Leave a Reply

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