Linux > Command line BitTorrent client

BitTorrent is the name of a peer-to-peer (P2P) file distribution protocol, and of a free software implementation of that protocol.

Advertisement

The BitTorrent client is a computer program developed by BitTorrent, Inc. used to download and upload files via the BitTorrent protocol. You can download python based command line BitTorrent client download for Linux/BSD/Mac OS X/UNIX link oses. This is quite useful, if you would like to download file remotely over SSH session. bittorrent.com offers bittorrent client in .deb (Debian Linux) or rpm (RedHat/Fedora Core/CentOS Linux) file formats.

To use the bittorrent in command line one you need to use command bittorrent-console or bittorrent-curses (see below for examples).

Step # 1: Find Python version

Make sure you download file according to your python version. Type following command to find out python version:
$ python -V
Output:

Python 2.4.2

Step # 2: Download bittorrent client

Use wget to download bittorrent client

Download bittorrent client for Debian Linux:

$ wget http://download.bittorrent.com/dl/bittorrent_5.0.3_python2.4.deb

Download bittorrent clientFor Red Hat / Fedora Core / Cent OS Linux

$ wget http://download.bittorrent.com/dl/BitTorrent-5.0.3-1-Python2.4.noarch.rpm

Step # 3: Linux Install BitTorrent client

First login as a root user (use su or sudo command). If you are using Debian Linux, use dpkg command install bittorrent client
# dpkg -i bittorrent_5.0.3_python2.4.deb
If you are using Red Hat / Fedora Core /Cent OS Linux, use rpm command install bittorrent client:
# rpm -ivh BitTorrent-5.0.3-1-Python2.4.noarch.rpm

Step # 4: Start using or downloading files

Use bittorrent client as follows:
$ /usr/bin/bittorrent-curses 'http://www.some.org/DesktopBSD.iso.torrent'
OR
$ bittorrent-curses 'http://www.some.org/DesktopBSD.iso.torrent'
OR
$ /usr/bin/bittorrent-curses '/path/to/file.torrent'
You can try out pure console based client bittorrent-console instead of curses based client:
$ bittorrent-console '/path/to/file.torrent'
$ /usr/bin/bittorrent-console 'http://www.some.org/DesktopBSD.iso.torrent'

Tips about using and Troubleshooting BitTorrent client

(A) If you get [Errno 2] No such file or directory, you need to use wget or lynx command to download .torrent file to local hard drive first. For example
$ bittorrent-curses 'http://www.mininova.org/get/some_file[222].torrent'
First download download .torrent file using any one of the following method:
$ lynx 'http://www.mininova.org/get/some_file[222].torrent'
When prompted save .torrent file to a hard-disk. Another option is use wget to download .torrent file:
$ wget 'http://www.mininova.org/get/some_file[222].torrent'
Now start the downloading as follows:
$ bittorrent-curses 'some_file[222].torrent'

(B) If you get error ‘This seems to be an old Python version which does not support detecting the filesystem encoding. Assuming ‘ascii’, then upgrade your python version to 2.4.xx:

Debian user upgrade python version using apt-get command:
# apt-get update
# apt-get install python2.4

Red Hat Linux user try out:
# up2date python2.4
Fedora Linux user try out:
# yum install python2.4

Remember if you have both versions (python v2.3 and v2.4) installed, you need to run bittorent client as follows:
$ python2.4 /usr/bin/bittorrent-curses '/path/to/file.torrent'
Command line BitTorrent client should work with other UNIX like operating systems such as FreeBSD/OpenBSD/Solaris etc (as long as you have Python it should work).

The current client enables a range of features including multiple parallel downloads. It also intermediates peering between itself, source file servers (read as trackers) and other clients, thereby yielding great distribution efficiencies. The client also enables users to create and share torrent files. See help files for more information.

See also:

🥺 Was this helpful? Please add a comment to show your appreciation or feedback.

nixCrat Tux Pixel Penguin
Hi! 🤠
I'm Vivek Gite, and I write about Linux, macOS, Unix, IT, programming, infosec, and open source. Subscribe to my RSS feed or email newsletter for updates.

94 comments… add one
  • hayden Feb 21, 2010 @ 4:40
  • SathiyaMoorthy Feb 23, 2010 @ 10:30
  • stib Oct 6, 2010 @ 13:43

    Another good client for the command line is transmission. Very simple to use and light weight too.

  • Nick Jul 14, 2011 @ 22:16

    This wget link is old, a working new one would be http://download.bittorrent.com/dl/archive/bittorrent_5.0.9_python2.5.deb

  • keith Oct 25, 2011 @ 13:52

    hi I’m new in linux ,anyone can help me to provide me website to download operating system.appreciate your help..

  • Taps Dec 1, 2011 @ 17:57

    ” —————————————————————————————————–
    | file: Haunted Manor 2- Queen of Death CE.rar |
    | size: 751,689,629 (716.9 M) |
    | dest: /home/tapas/Haunted Manor 2- Queen of Death CE.rar |
    | progress: _________________________________________________________________________________________ |
    | status: connecting to peers (0.0%) |
    | speed: 0 B/s down – 0 B/s up |
    | totals: 0.0 M down – 0.0 M up |
    | error(s): [23:24:57] Problem connecting to tracker – HTTP Error 503: Service Unavailable ”
    how can i get rid of this problem??

  • asf Dec 15, 2011 @ 12:54

    this is shit.

    apt-get install bittorrent

    then you’re fucked up anyway cause it’s confusing, no damn tutorials about ssh torrent

  • Prescilla Jan 28, 2012 @ 16:14

    Hello, thank you for this info but I can’t seem to make it work. When I tried bittorrent-curses the message was:

    bittorrent-curses: command not found

    I am sure that it is installed. Can you tell me what’s wrong?

    When I tried to install it again, here’s the message:

    sudo apt-get install python-bittorrent
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    python-bittorrent is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

    Please help.

  • landon kelsey Mar 7, 2012 @ 17:58

    what a mess! Windows 7 has no python

    you’ve created a research project out of something so simple

    all because you didn’t THINK

  • Bhavesh Apr 22, 2012 @ 5:21

    error: Failed dependencies:
    python-psyco is needed by BitTorrent-5.0.3-1.noarch
    python-twisted >= 2.0 is needed by BitTorrent-5.0.3-1.noarch
    python-zopeinterface is needed by BitTorrent-5.0.3-1.noarch
    wxPython >= 2.6 is needed by BitTorrent-5.0.3-1.noarch

  • Torrent fan Mar 23, 2013 @ 10:43

    Can anybody help me resolve this issue with Bittorrent.
    ERROR:
    [16:10:37] Problem connecting to tracker –

    [root@localhost Desktop]# netstat -an |grep -i 6881
    tcp 0 0 0.0.0.0:6881 0.0.0.0:* LISTEN
    udp 0 0 0.0.0.0:6881 0.0.0.0:*
    [root@localhost Desktop]# netstat -an |grep -i 6889
    [root@localhost Desktop]# python -V
    Python 2.4.3

    • Torrent fan Mar 23, 2013 @ 10:45

      Here is full error description:
      ERROR:
      [16:10:37] Problem connecting to tracker –-

  • leaveittobeaver Sep 1, 2013 @ 5:50

    ok i have installed it but what is the proper command to tell it where to put the torrent that i want to download?

Leave a Reply

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

Use HTML <pre>...</pre> for code samples. Your comment will appear only after approval by the site admin.