<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Eyes-free Linux Ninja! (bit-torrent)</title><link>http://eyesfreelinux.ninja/</link><description></description><atom:link href="http://eyesfreelinux.ninja/categories/bit-torrent.xml" type="application/rss+xml" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 22 Sep 2017 20:57:19 GMT</lastBuildDate><generator>https://getnikola.com/</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Transmission Command-line Bit-torrent Programs</title><link>http://eyesfreelinux.ninja/posts/transmission-command-line-bit-torrent-programs.html</link><dc:creator>Mike</dc:creator><description>&lt;div&gt;&lt;p&gt;I was after a method of downloading and seeding bit-torrents exclusively from the command-line.&lt;/p&gt;
&lt;p&gt;I tried &lt;code&gt;aria2&lt;/code&gt; but found it unreliable.  I don't know if it was because I was doing something wrong 
but none of the torrent files I downloaded were not corrupted in some way.&lt;/p&gt;
&lt;p&gt;And anyway I wanted something to run in the background.&lt;/p&gt;
&lt;p&gt;I tried &lt;code&gt;transmission-cli&lt;/code&gt;.  Better results but again this was not something that just ran in the 
background.&lt;/p&gt;
&lt;p&gt;So I installed a pair of related programs: &lt;code&gt;transmission-daemon&lt;/code&gt; and &lt;code&gt;transmission-remote&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;em&gt;Daemon&lt;/em&gt; part of this program is exactly that, a &lt;code&gt;daemon&lt;/code&gt; that runs, as all daemons do, in the 
background.&lt;/p&gt;
&lt;p&gt;And the &lt;em&gt;Remote&lt;/em&gt; part is a command-line program to control it.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;remote&lt;/code&gt; part is included in the &lt;code&gt;transmission-cli&lt;/code&gt; package.&lt;/p&gt;
&lt;p&gt;So:&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;$ sudo apt-get install transmission-daemon transmission-cli
&lt;/pre&gt;


&lt;p&gt;Will install them both on Debian or Debian derivatives.  Although why you're running a derivative 
when you could run &lt;strong&gt;Debian&lt;/strong&gt; I don't know.&lt;/p&gt;
&lt;p&gt;The default installation of &lt;code&gt;transmission-daemon&lt;/code&gt; is configured for the user it runs to be set to 
&lt;code&gt;transmission&lt;/code&gt; and the password is also set to &lt;code&gt;transmission&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;And by default it is only possible to access the daemon and the management web page from the local 
machine (&lt;code&gt;localhost&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;This led to a tedious situation, any command entered to make &lt;code&gt;transmission-remote&lt;/code&gt; do anything 
with the daemon meant this was the command-line:&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;$ transmission-remote localhost --auth transmission:transmission &amp;lt;command&amp;gt;
&lt;/pre&gt;


&lt;p&gt;I don't want to have to type that in every time.&lt;/p&gt;
&lt;p&gt;So I set up an alias in &lt;code&gt;.bash_aliases&lt;/code&gt;:&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;alias trem='transmission-remote localhost --auth transmission:transmission'
&lt;/pre&gt;


&lt;p&gt;Now I can just type:&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;$ trem &amp;lt;command&amp;gt;
&lt;/pre&gt;


&lt;p&gt;For example, to add a torrent:&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;$ trem --add &amp;lt;torrent&amp;gt;
&lt;/pre&gt;


&lt;p&gt;To list all the current torrents and their status:&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;$ trem --list
&lt;/pre&gt;


&lt;p&gt;To remove and delete a torrent:&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;$ trem -tN --remove-and-delete
&lt;/pre&gt;


&lt;p&gt;(where N is the number in the list returned by the &lt;code&gt;--list&lt;/code&gt; command).&lt;/p&gt;
&lt;p&gt;To start a torrent:&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;$ trem -tN --start
&lt;/pre&gt;


&lt;p&gt;And to stop one:&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;trem -tN --stop
&lt;/pre&gt;


&lt;p&gt;There are loads of other commands but these are the ones I use the most, and mostly &lt;code&gt;--add&lt;/code&gt; and 
&lt;code&gt;--list&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Note also that &lt;code&gt;transmission&lt;/code&gt; will handle the &lt;code&gt;magnet&lt;/code&gt; links found on the &lt;em&gt;Pirate Bay&lt;/em&gt; download 
site.&lt;/p&gt;&lt;/div&gt;</description><category>bit-torrent</category><category>command-line</category><guid>http://eyesfreelinux.ninja/posts/transmission-command-line-bit-torrent-programs.html</guid><pubDate>Thu, 20 Aug 2015 11:19:00 GMT</pubDate></item></channel></rss>