Tuesday 23 August 2011

BitTorrent Installation in Linux




 BitTorrent


Every body these days knows what BitTorrent is. For those that don’t BitTorrent is a great way to download large files. Some times it is faster to download an ISO of a Linux distribution by torrent then by ftp or http. This is because bit torrent is Peer-to-Peer meaning that many people share the file rather than one bogged down server. If your interested in how BitTorrent works, check out WikiPedia’s BitTorrent Page

In order to download a .torrent file you need a client. Fortunately Linux users are in luck because there are a lot of Linux Torrent clients out there.

Every one has favorites, in this post I’m listing my favorite Linux Torrent Client, both graphical and command line based. If you know of a better client suited to download torrents please let me know!

My Favorite Linux Torrent Clients

My favorite graphical torrent client is actually a cross platform BitTorrent client. Many people will have already heard of this one as it is one of the most popular: Azureus
 It has a really neat graphical interface that has a lot of features. The client can be skinned which means you can make it match your desktop if your into eye candy. For screenshots check the Azureus website and the google image search results for Azureus Linux screenshots.

Now don’t get me wrong I’m all about graphical interfaces. Computing as we know it today would not be the same if it was not for the user interface, but there are still great uses for shell applications. Primary development of a killer app doesn’t always start with a pretty interface. Which is why I bring up the next client that I really like. This is the Linux client by Bram Cohen. In Slackware the package can be installed with slackpkg or slapt-get. In Debian or Ubuntu with apt-get. The package has a couple of clients but the best one in my opinion is bittorrent-curses. Once installed all you have to do to start downloading is the following:

bittorrent-curses <TORRENTFILE.torrent>



Many advanced options for the client are available check them out:

Usage: bittorrent-curses [OPTIONS] [TORRENTFILE]


arguments are -
 –ip <arg>
 ip to report to the tracker (has no effect unless you are on the same
 local network as the tracker) (defaults to ”)


–forwarded_port <arg>
 world-visible port number if it’s different from the one the client
 listens on locally (defaults to 0)


–minport <arg>
 minimum port to listen on, counts up if unavailable (defaults to
 6881)


–maxport <arg>
 maximum port to listen on (defaults to 6999)


–bind <arg>
 ip to bind to locally (defaults to ”)


–display_interval <arg>
 seconds between updates of displayed information (defaults to 0.5)


–rerequest_interval <arg>
 minutes to wait between requesting more peers (defaults to 300)


–min_peers <arg>
 minimum number of peers to not do rerequesting (defaults to 20)


–max_initiate <arg>
 number of peers at which to stop initiating new connections (defaults
 to 60)


–max_incomplete <arg>
 max number of outgoing incomplete connections (defaults to 100)


–max_allow_in <arg>
 maximum number of connections to allow, after this new incoming
 connections will be immediately closed (defaults to 80)


–check_hashes, –no_check_hashes
 whether to check hashes on disk (defaults to True)


–max_upload_rate <arg>
 maximum kB/s to upload at, 0 means no limit (defaults to 20)


–min_uploads <arg>
 the number of uploads to fill out to with extra optimistic unchokes
 (defaults to 2)


–max_files_open <arg>
 the maximum number of files in a multifile torrent to keep open at a
 time, 0 means no limit. Used to avoid running out of file
 descriptors. (defaults to 50)


–start_trackerless_client, –no_start_trackerless_client
 Initialize a trackerless client. This must be enabled in order to
 download trackerless torrents. (defaults to True)


–upnp, –no_upnp
 Enable automatic port mapping (UPnP) (defaults to True)


–save_as <arg>
 file name (for single-file torrents) or directory name (for batch
 torrents) to save the torrent as, overriding the default name in the
 torrent. See also –save_in (defaults to ”)


–max_uploads <arg>
 the maximum number of uploads to allow at once. -1 means a
 (hopefully) reasonable number based on –max_upload_rate. The
 automatic values are only sensible when running one torrent at a
 time. (defaults to -1)


–save_in <arg>
 local directory where the torrent contents will be saved. The file
 (single-file torrents) or directory (batch torrents) will be created
 under this directory using the default name specified in the .torrent
 file. See also –save_as. (defaults to ”)


–responsefile <arg>
 deprecated, do not use (defaults to ”)


–url <arg>
 deprecated, do not use (defaults to ”)


–ask_for_save <arg>
 whether or not to ask for a location to save downloaded files in
 (defaults to 0)


–spew, –no_spew
 whether to display diagnostic info to stdout (defaults to False)


–data_dir <arg>
 directory under which variable data such as fastresume information
 and GUI state is saved. Defaults to subdirectory ‘data’ of the
 bittorrent config directory. (defaults to ”)


–filesystem_encoding <arg>
 character encoding used on the local filesystem. If left empty,
 autodetected. Autodetection doesn’t work under python versions older
 than 2.3 (defaults to ”)


–language <arg>
 ISO Language code to use: af, bg, ca, cs, da, de, el, en, es, es_MX,
 fr, he, hu, is, it, ja, ko, nb_NO, nl, pl, pt, pt_BR, ro, ru, sk, sl,
 sv, tr, vi, zh_CN, zh_TW (defaults to ”)


–keepalive_interval <arg>
 number of seconds to pause between sending keepalives (defaults to
 120.0)


–download_slice_size <arg>
 how many bytes to query for per request. (defaults to 16384)


–max_message_length <arg>
 maximum length prefix encoding you’ll accept over the wire – larger
 values get the connection dropped. (defaults to 8388608)


–socket_timeout <arg>
 seconds to wait between closing sockets which nothing has been
 received on (defaults to 300.0)


–timeout_check_interval <arg>
 seconds to wait between checking if any connections have timed out
 (defaults to 60.0)


–max_slice_length <arg>
 maximum length slice to send to peers, close connection if a larger
 request is received (defaults to 16384)


–max_rate_period <arg>
 maximum time interval over which to estimate the current upload and
 download rates (defaults to 20.0)


–max_rate_period_seedtime <arg>
 maximum time interval over which to estimate the current seed rate
 (defaults to 100.0)


–max_announce_retry_interval <arg>
 maximum time to wait between retrying announces if they keep failing
 (defaults to 1800)


–snub_time <arg>
 seconds to wait for data to come in over a connection before assuming
 it’s semi-permanently choked (defaults to 30.0)


–rarest_first_cutoff <arg>
 number of downloads at which to switch from random to rarest first
 (defaults to 4)


–upload_unit_size <arg>
 how many bytes to write into network buffers at once. (defaults to
 1380)


–retaliate_to_garbled_data, –no_retaliate_to_garbled_data
 refuse further connections from addresses with broken or
 intentionally hostile peers that send incorrect data (defaults to
 True)


–one_connection_per_ip, –no_one_connection_per_ip
 do not connect to several peers that have the same IP address
 (defaults to True)


–peer_socket_tos <arg>
 if nonzero, set the TOS option for peer connections to this value
 (defaults to 8)


–bad_libc_workaround, –no_bad_libc_workaround
 enable workaround for a bug in BSD libc that makes file reads very
 slow. (defaults to False)


–tracker_proxy <arg>
 address of HTTP proxy to use for tracker connections (defaults to ”)


–close_with_rst <arg>
 close connections with RST and avoid the TCP TIME_WAIT state
 (defaults to 0)


–twisted <arg>
 Use Twisted network libraries for network connections. 1 means use
 twisted, 0 means do not use twisted, -1 means autodetect, and prefer
 twisted (defaults to -1)


No comments:

Post a Comment

Do not post irrelevant comments, please!

Browser Name:
Browser Version:
Browser Code Name:
User-Agent: