Tutorials for downloading using BitTorrent on the Linux command line

Source: Internet
Author: User
Tags command line

If you like to try the latest or even beta version of Linux to satisfy your curiosity and keep it the newest version, you will often experience the annoyance of downloading a larger ISO image. ISO-provided people typically use an iso-mirrored. torrent file to reduce server bandwidth consumption. Peer-to-peer downloads are also obvious for users (in terms of download speed), especially when a new version of the popular Linux distribution is released and uploaded for download, and everyone downloads it at the same time.

Ubuntu 14.10 (Utopic Unicorn) This has just been released soon, so there should be a lot of seeds available to download that version now on BitTorrent network. Although there are a lot of BitTorrent clients based on the graphical interface, I will show you how to download the ISO image through a BitTorrent client based on a simple command-line interface, which is handy if you are on a server that has no graphical interface remotely.

The command-line-based BitTorrent client I am using today is transmission-cli. As you may know, transmission is one of the most popular BitTorrent clients based on graphical interfaces. TRANSMISSION-CLI is its lite version of the command line.

Install TRANSMISSION-CLI on Linux

To install TRANSMISSION-CLI, you don't have to install a full transmission based on the graphical interface, which sounds good.

On Debian, Ubuntu, or on their distributions:

The code is as follows:

$ sudo apt-get install TRANSMISSION-CLI

On Fedora:

The code is as follows:

$ sudo yum install transmission-cli

On CentOS or RHEL (after the Epel Warehouse is installed):

The code is as follows:

$ sudo yum install transmission-cli

Download the ISO image quickly via TRANSMISSION-CLI

The use of TRANSMISSION-CLI is very simple. If you're lazy about learning its command-line options, all you have to do is download the. torrent file and run the command. This automatically finds the available seeds and downloads the ISO files from there.

The code is as follows:

$ wget http://releases.ubuntu.com/14.10/ubuntu-14.10-desktop-amd64.iso.torrent

$ transmission-cli Ubuntu-14.10-desktop-amd64.iso.torrent

Once the ISO image download is complete, it is stored in the ~/downloads folder by default. It took me 5 minutes to download the 1GB Ubuntu ISO image.

After the program downloads the ISO image, you will see the "status from incomplete to complete" prompt in the terminal. Note that TRANSMISSION-CLI will continue to run and be made available for download by other downloads. You can press CTRL + C to exit.

Custom download options for reuse

If you use transmission-cli often, it's worth taking the time to familiarize yourself with its command-line options.

The-w/path/to/download-directory option specifies the folder where the download file is saved.

The-f/path/to/finish-script option sets the script to run after the current download completes. Note TRANSMISSION-CLI will continue to run after the file download is complete by default. You can use this option if you want to automatically turn off transmission-cli after the successful download is complete. Here's a simple script to do this.

The code is as follows:

#!/bin/sh

Sleep 10

Killall TRANSMISSION-CLI

If you want to assign upload/download bandwidth limits for TRANSMISSION-CLI, you can use the "-D " and " -u" options. If you don't want to limit bandwidth usage, just specify the "D" or "u" option.

This has a more advanced example of TRANSMISSION-CLI usage. In this example, the command line client automatically exits after a successful download. Download speed is not limited to upload speed limit to 50kb/s.

The code is as follows:

$ transmission-cli-w ~/iso-d-u 50-f ~/finish.sh ubuntu-14.10-desktop-amd64.iso.torrent

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.