How to download Torrents using the command-line in Terminal

rTorrent lets you download Torrents from the Terminal using command-lines. Being a Command-Line Interface program (CLI), it is light-weight and quick.

Using torrents is a great and efficient way of file sharing. It provides useful features like the ability to pause downloads, setting upload/download speed limits, and managing multiple downloads efficiently. And since downloading a torrent is based on the availability of its seeders, it’s more common in an interactive community, like that of FOSS.

Download Torrents using Command-line

In this article of Terminal Tuts, we’re going to show you how to download Torrents using the command-line via the Terminal interface. We will use a program called rTorrent. There are many others, but most of them were created because of the existence of their GUI first. rTorrent is independent and only CLI based.

rTorrent Features

1. Terminal is the UI

Being a CLI program, we would expect the content to be organized well, and rTorrent exactly does that. Categorization of items is clear, and that’s all one need to use the program.

rtorrent UI
Running window of rTorrent

2. Minimum CPU and maximum bandwidth

rTorrent is light on the system resources as it is a text-based program. It fetches the maximum data transfer speeds! Therefore, when compared to a GUI based torrent program, you will undoubtedly notice a considerable increase in system performance and data speeds.

3. Torrent information

Users can view the details of the torrents opened in rTorrent similar to any GUI torrent client. Information such as the size of the files, the amount downloaded, the upload/download speed, remaining time and a few more details are displayed.

Torrent info
Running torrent.

Further, users can check information like source, filename, size, active time, number of files, memory usage and even details like the number of chunks.

Options are available to view the peer list, file list, tracker list, transfer list and the chunks seen.

These can be accessed by simply selecting a torrent and pressing the Right Arrow key.

Torrent details
Torrent details.

Installation

rTorrent is available in most major distributions’ repositories. For Ubuntu, Linux Mint or any derivatives, type:

sudo apt-get install rtorrent

rT install
Installation on Linux Mint

For other distributions, you can either search in your distribution’s repositories or download the .tar.gz package from here.

After downloading the package, run the following commands (assuming it’s in the Downloads directory):

cd Downloads/
tar -xzvf rtorrent*.tar.gz
cd rtorrent<Tab>

(Press the tab key after writing rtorrent. Terminal will complete rest of the name.)

./configure; make; sudo make install

And that’s it. For more information on installation, visit this site.

Usage

rTorrent is a great program, especially if you know the keyboard commands and shortcuts. So, we’ll be showing some of the everyday actions that you’ll require to manage your torrents.

Starting up rTorrent

Starting it up is easy. Just fire up a terminal, and write:

rtorrent

rTorrent will cover up the whole terminal screen.

rT opening
Opening window.

Adding torrents

There are two options to add torrents. First, you can use a downloaded torrent file or the URL of the torrent file. Both have the same method.

After starting rTorrent, press Enter, and you’ll get this:

rT enter(ed)
After pressing Enter.

Now after this ‘load.normal>’ part, enter the location, or the URL of the file. By default, the working directory of this program is the home directory. So say if you want to select a torrent from the Downloads directory, enter Downloads, and DON’T press Enter. You have to enter the whole filename of the torrent file, so press the Tab key. That will list all the files in the window.

rT-tab
Listing contents of a directory.

Complete the filename, and press Enter. The torrent will appear in the window.

Alternatively, press Enter after starting rTorrent and copy-paste the URL of the torrent file.

rT location of torrent
Entering the location of the torrent.

rT URL
Entering URL of the torrent.

The torrent will not start downloading by default. It would begin automatically if you press Backspace instead of entering to input the location of the torrent file. We intentionally did this, because if you enter it that way, you don’t get the option to change the destination directory of the torrent download. So that’s the next part.

Changing the destination directory

Now that the torrent is added press the upper arrow key to select it. When it is selected, three asterisks (*) will appear to the torrent’s left.

rT selected torrent
Selecting a torrent.

Now enter CTRL + O. This will show a prompt of change_directory, and now you can enter the desired destination directory.

Don’t worry; you won’t have to do this every time. We will show the automation of this at the end of the article.

Starting download

Now to start the download of the torrent, simply select it (using upper arrow) and press CTRL + S. The download will begin.

Stopping and removing the torrent download

Stopping and removing the use of the same command. To stop/pause a download, select it and press CTRL + D. After stopping it once, the status will show Inactive. To remove it, press the same combination one more time.

Viewing more information

To see more information, you simply have to select the torrent and press the Right Arrow key. I have described before in this article what information will show up.

Changing priorities

Changing priorities is simple. All you have to do is select the torrent, and press ‘+’ if you want to set it to a high priority level, and ‘-‘, if you want to set it to a low priority level. (NOTE: The ‘+’ and ‘-‘ of the number-pad don’t work. Use the ones on the left of backspace~). The priority will show up on the right side.

rT-priority
Torrent priority displayed.

You can also change the priorities of files of a specific torrent, after going in the ‘File list’ sub-section of the information menu (the one that comes up after pressing Right Arrow key).

Viewing options

There exists an option to view files by their status. Some are listed:

  • 0: Show active
  • 1: Show all
  • 2: Show all; ordered by name
  • 3: Show started
  • 4: Show stopped
  • 5: Show completed

Exiting

To exit rTorrent, press CTRL + Q.

Configuration file

It is optional but highly recommended. rTorrent does have certain disadvantages, but you can work around them. We will create a configuration file for rTorrent that will have all the needed details.

First, create the file using:

nano rtorrent.rc

We will first change the default destination from home directory to wherever we want. We will use a directory named rtorrent for example (make sure to create a directory of that name). Enter this:

 directory=~/rtorrent/

(‘~’ symbol signifies home directory.)

Next, to auto-resume incomplete downloads on starting rTorrent, you will have to add the location of the directory in which the torrent files are located. Typically, it’s the Downloads directory.

load_start=~/Downloads/*.torrent

So the file looks like this:

rT conf
Configuration file.

Now save it by pressing CTRL + X, and then type ‘y’ and press Enter.

Conclusion

We have explained everything in detail so that you can change and use the options available as much as you’d like. For even more commands and options, visit this site. rTorrent is an excellent program for the highest productivity, and we hope you have fun using it!

Let us know about your views in the comment section.

Pulkit Chandak
Pulkit Chandak is a Linux enthusiast and has been using and experimenting with open source software and hardware too since a long time. He is a huge admirer of open source software and wants to ventilate it to all around him. He is interested in reviewing and writing tutorials on Linux and its many distributions. He believes that freedom in software leads to freedom of the mind from the chains of limits.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

STAY CONNECTED

23,538FansLike
365FollowersFollow
16SubscribersSubscribe

LATEST ARTICLES

How to install CouchPotato on Ubuntu

Downloading movies and copying them over to your home server can get frustrating, especially if you are doing it daily! What if you have an option to download videos automatically, quickly, and above all with excellent quality. CouchPotato allows you to download movies easily once they are available and released automatically.

Top 20 Rsync Examples in Linux

The Rsync (remote sync) command is a Linux/Unix utility used to synchronize and copy files and directories either locally or remotely. Most Linux geeks use Rsync to mirror, backup or migrate data across folders, across disks and networks. One notable feature with the Rsync command is that it uses the "delta transfer algorithm."

Setting up NFS Server on Ubuntu Server

We have put together a detailed step-by-step tutorial that will guide you on how to install and set up NFS Server on Ubuntu so you too can start sharing data with other client systems. It is divided into sections, the first part discussing how to set up the host server and the second part showing you how to set up the client-side. For this tutorial, we will be using Ubuntu 20.04 LTS.

Crontab in Linux Explained With Examples

Crontab is the Linux equivalent of the Window's Task Scheduler. It can help you set up a task to run automatically at a regular...

The 10 Best Linux Server Distros For Home And Businesses

By the year 2020, it is estimated that there are close to 600 Linux distributions in the market. It includes both servers and Desktop versions; therefore, if you are looking for lightweight Linux distribution for your old PC or a reliable desktop version for employees in your organization, you may be overwhelmed with the number of choices for finding one for your use.

How to list the installed Packages on Ubuntu

It is only natural to start installing more and more software on your Ubuntu PC once you start using it. Similarly, it is also natural to lose track of the different packages that you have installed on your system. Eventually, you may be overwhelmed with the number of packages in your system and with the ones you hardly used.

MUST READ

Linux is growing faster than ever. As per the latest report, there is a drop in the Windows 10 market share for the first time, and Linux's market share has improved to 2.87% this month. Most of the features in the list were rolled out in the Pop OS 20.04. Let's a detailed look into the new features, how to upgrade, and a ride through video.
Elementary OS 5.1 Hera has received a point release with a handful of new features and bug fixes, and we will be reviewing the significant changes in this article. For those new to elementary OS, this Ubuntu-based Linux distribution uses their inhouse built Pantheon desktop environment and AppCenter.

5 Best Application Launchers for Ubuntu

Ubuntu is one of the most used Linux distributions worldwide. It is also the reason why it has the maximum number of available programs for itself. Today we are going to talk about one category of those programs, the application launchers.

7 Best Ways to Kill Unresponsive Programs in Linux

For dealing with a frozen app or desktop, you can't use the CTRL+ALT+DEL in Linux system. Instead, there are powerful alternatives that come in handy in frustrating situations. We pick the best methods available for you.

10 Best Screen Capturing Software for Linux

Do you want to make a video tutorial for YouTube or show-off your epic victory royale to your friends? Look no further — as we have compiled the 10 Best Screen Capturing Software for Linux. Whether you need to record your desktop screen or take a simple screenshot, FOSSLinux has got your back.

VIDEO: Linux Lite 4.8 Features and Desktop Tour

Linux Lite eases Windows 7 users transition to Linux much more comfortable by offering simple software like Team Viewer, VLC, Firefox, TimeShift backup utility, and a full Microsoft Office compatible office suite in LibreOffice.