Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
Never done it myself so commenting rather than answering, most notable torrent client have this feature on gui section and some of them have command line interface. You may give a shot at transmission-cli or qbittorrent-nox or deluge-console or rtorrent. – sagarchalise Mar 25 '11 at 21:02
rtorrent doesn't have torrent creation sadly (the one I use) i'll check out the others – allenskd Mar 25 '11 at 22:21
rtorrent doesn't and won't have creation feature as developer says here: – Pedram Mar 25 '11 at 22:29
up vote 21 down vote accepted

How about ctorrent?

sudo apt-get install ctorrent
ctorrent -t -u "" -s example.torrent file_or_dir_to_upload 

It's also a very good client.

share|improve this answer
for some reason the torrent would not seed. – chovy Dec 21 '12 at 8:54

Transmission can do it:

$ ./transmission-create --help
Usage: transmission-create [options] <file|directory>


 -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:// ~/torrent/complete/my_file_or_directory_to_share.extension

you can find more documentation here

share|improve this answer

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

share|improve this answer

Buildtorrent 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.

share|improve this answer



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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.