Ubuntu Torrent Client From Command Line

Ubuntu torrent client is not only available in GUI mode. The most simple Ubuntu torrent client is Transmission, beside it has GUI mode it also available for command line interface. It have the same feature, you can both upload and download torrent file from command line interface. As one of the Ubuntu torrent client, Transmission is easy to use and easy to install too.

Why use Ubuntu torrent client from CLI?

This is an interesting question. Why we should use Ubuntu torrent client from the CLI mode while we have the GUI mode? The answer is simple, in Ubuntu server, it is rarely that someone install GUI in it. So the perfect Ubuntu torrent client should be accessible from the SSH and use it from the command line interface.

How to install Transmission

Transmission is one of the Ubuntu torrent client, it available in both GUI and CLI mode. For now i would like to talk about the CLI mode and how to install Ubuntu torrent client. Follow the steps below:

  1. Open your Ubuntu terminal
  2. Run this command:
    sudo apt-get install transmission-cli

How to download torrent with Transmission from CLI

Since we are going to use Transmission from the command line interface, here is the format how to use Transmission command to download a torrent:

transmissioncli [-v [level]] [-p port] [-d download-rate] [-u upload-rate] [-f script] [-o output-dir] torrent-file

For example:

transmissioncli [torrentfile] #basic use using default value
transmissioncli -d 25 -u 25 [torrentfile] #use download and upload limit to 25 KB/s

How to create a torrent file with Transmission from CLI

Transmission also have ability to create torrent file and ready to share. here is the basic format to create a torrent file with Transmission:

transmissioncli [-v [level]] -n source-file -a announce-url [-p port] [-c comment] output-file

For Example:

transmissioncli -n myfile.iso -a http://YOUR-TRACKER -w /home/<username>/torrent myfile.torrent
transmissioncli -n mydir/ -a http://YOUR-TRACKER -w /home/<username>/torrent myfile.torrent

For list of tracker i have write in my previous article how to send large files with bittorent.

Command arguments description:
-c, –create-from source-file: Create torrent from the specified source file.
-a, –announce announce-url: Specifies the announce-url the new Ubuntu torrent client will use. Can only be used in conjunction with -c or –create-from.
-r, –private: Sets the private flag for the new ubuntu torrent client. Can only be used in conjunction with -c or –create-from.
-m, –comment comment-text: This optional parameter adds a comment to the new ubuntu torrent client. Can only be used in conjunction with -c or –create-from.
-h, –help: Prints a short usage summary.
-i, –info: Shows information from the specified torrent file, such as the cryptographic hash, the tracker, announcement, file size and file name.
-o, –output-dir directory: Uses the specified directory as destination for downloaded data.
-s, –scrape: Prints the number of seeders and leechers for the specified torrent file, and exits.
-v, –verbose [level]: Sets debugging options. You can use both many -v flags, or a -v level. The current available levels are 0-2, with the highest level producing the most output. The default is 0.
-n, –nat-traversal: Attempt to use the NAT-PMP and UPnP IGD protocols to establish a port mapping for allowing incoming peer connections.
-p, –port port: Specifies an alternate port for the client to listen on. The default is 51413.
-u, –upload upload-rate: Specifies the maximum upload rate in kB/s, which defaults to 20. The level -1 may be used for unlimited uploads.
-d, –download download-rate: Specifies the maximum download rate in kB/s, which defaults to -1 for no download limit.
-f, –finish script: Specifies a shell script to be executed upon successful download.
-y, –recheck: Force a recheck of the torrent data.

As Ubuntu torrent client, Transmission also have the GUI mode with Qt and also have daemon service and accessible from the web. So you can help the Ubuntu community by seeding Ubuntu ISO for the next coming Ubuntu Natty, with this Ubuntu torrent client. Have fun!
Ubuntu torrent client manual


  1. PubLi says:

    Is that possible to capture current download/upload rate of any active torrent by using Transmission-cli ?
    Or at least can we get it from any log/file or something else ?

Give me your feedback

This site uses Akismet to reduce spam. Learn how your comment data is processed.