How to Download Torrents from the Command Line in Ubuntu

Though Torrenting is usually regarded as a dirty word, there are a lot of positives to using it, especially when talking about Linux. For starters, if you’re creating a Linux distribution, it’s a great way to outsource your bandwidth. No more hosting download servers. Just give a torrent out to your community, and have them seed the torrent! Low bandwidth bills and fast transfers for everyone!

For the most part, torrenting on Linux is done with GTK clients. Most notably: Transmission-GTK. However, people might be interested to know that it is indeed possible to download torrents directly inside the terminal. How does this all work? Let’s find out!

There are many good CLI-based torrent clients, but few are as good as transmission-cli. It is the easiest to use out of all the choices out there and similar to the most-used torrent client on Linux (Transmission-GTK).

To install transmission-cli, open a terminal window and enter the following command:

Adding a torrent to transmission-cli is pretty straightforward. Start off by finding a torrent file from your preferred torrent distributor. In this tutorial we’ll be using the Ubuntu alternative release torrents.

URL

transmission-cli-download-torrent-url

Transmission-cli can download a torrent directly from a URL by doing:

This method is great if the user is in a pinch and just wants the download to happen as soon as possible.

Magnet Links

This torrent client also has support for magnet links. To download a torrent with a magnet link, try something like this:

Torrent Files

And lastly, the third way transmission-cli can be downloaded is with a torrent file. Obtain a torrent file by conventional means (through a web browser) or find a link to a torrent file, and download it through the terminal with wget.

For example:

To download with a torrent file, do the following:

transmission-cli-download-with-blocklist

Since transmission-cli works different than its GTK counterpart, it often doesn’t save settings. This means peer blocklists need to be specified each time before use. The -b switch enables a blocklist. To use one while downloading, follow this example:

transmission-cli-download-encryption

Though it’s not recommended to download sketchy files from torrents, it happens. To protect yourself while downloading these types of files, it is possible to encrypt the traffic while downloading. Here’s how to do it:

The -er flag tells transmission-cli to require encryption with all peers that it connects to. This may slow down transfer speeds, so this option might not be for everyone, especially those on slow transfer speeds.

To download with encrypted traffic, but increase transfer speed, try using the prefer encryption switch instead. This will tell peers that the client would prefer encryption, but it won’t require it.

transmission-cli-help-command-page

Transmission-cli is filled to the brim with all sorts of different options. To view these options, enter transmission-cli --help. Doing so will print out different command modifiers and flags that users can add to their transmission-cli commands for a better downloading experience.

As Linux users probably already know, the terminal can do anything. No matter what job, big or small, it can be accomplished in the terminal. Torrenting is no different.

Though it doesn’t seem as glamorous to download with a command instead of a fancy GUI, you’d be wrong. Transmission-cli has more features than even most mainstream graphical clients. If you’ve never tried to torrent on the command line, you’re in for a treat.

One comment

  1. Hi Derrick,

    It seems that the -b option only references the config-dir, but doesn’t let you specify a blocklist right on the command line. Have you noticed that too?

    Thank you

Comments are closed.

Sponsored Stories