Ubuntu: How to create a .torrent using the command line?


I'm using mktorrent, but I'm having problems with it since it doesn't hash the files in the directory for some weird reason...

I'm looking for a replacement specifically for command line


How about ctorrent?

sudo apt-get install ctorrent  ctorrent -t -u "http://tracker.example.com:6969/announce" -s example.torrent file_or_dir_to_upload   

It's also a very good client.


Transmission can do it:

$ ./transmission-create --help  Usage: transmission-create [options] <file|directory>    Options:     -h --help              Display this help page and exit   -p --private           Allow this torrent to only be used with the specified tracker(s)   -o --outfile <file>    Save the generated .torrent to this filename   -c --comment <comment> Add a comment   -t --tracker <url>     Add a tracker's announce URL   -V --version           Show version number and exit  

an example could be:

transmission-create -o /var/lib/transmission-daemon/downloads/files.torrent -c "My comments" -t udp://tracker.openbittorrent.com:80 ~/torrent/complete/my_file_or_directory_to_share.extension

you can find more documentation here


Transmission (in Ubuntu Desktop, transmission-gtk is the default bittorrent client) can also be used to create torrents. On the command-line, transmissioncli (installed by the transmission-cli package) can be used to create torrents. transmissioncli --help should tell you what options you need to use.

In 2.1x and later versions of transmission, that part has been split out from transmissioncli (since it's been deprecated for a while now, in favor of transmission-daemon) into transmission-create, -show and -edit. Ubuntu 11.04 will ship with version 2.13 of transmission. For all supported releases of Ubuntu, you can get the latest stable version of transmission from Transmission's official PPA at https://edge.launchpad.net/~transmissionbt/+archive/ppa.



sudo apt-get install buildtorrent  

From synaptic:

Description: command line torrent creation program

buildtorrent is a torrent file creation program. Given an announce url and an input file or directory, buildtorrent generates an output .torrent file that can be used by torrent clients.




Create torrents via command line!

py3createtorrent is a comprehensive shell/commandline utility for creating torrents (Linux & Windows). It's a GPL-licensed Python v3.1 script.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »