If you use torrents to download open-source software, you've probably seen a magnet link. But how do they work?
Peer-to-peer networks are essential for distributing large files across the internet—they lighten the load on servers and create a widespread distribution network. In recent years, magnet links have started to replace .torrent links. But what are magnet links, and why should you use them?
Let's say that you want to distribute a single large file. There are many legitimate reasons to do this, including distributing Linux distros (it's in the name) to users who will install Linux on their home machines.
Traditionally, the organization that creates the disc image will store the data on their own servers, and users download the file using a web browser. For large amounts of data, this creates problems for the downloader, who needs to keep the browser window open, and for the host server, which may burn through unreasonable bandwidth to keep up with demand. As such, direct downloads are often slow and prone to failure.
With traditional peer-to-peer torrenting, the large file is broken up into thousands of individual pieces. Users download a file with a .torrent extension. The torrent file is passed to a client such as Transmission or qBittorrent, which downloads each chunk of the file from other users while simultaneously uploading the pieces on your machine to other clients. Trackers, as the name suggests, keep track of where the pieces are in order for your client to download the file.
With a popular file distributed to and by an enormous number of users, download speeds are fast.
Torrents come with some disadvantages. First, the trackers aren't always fresh, which means that the record showing the location of individual pieces is out of date.
Magnet links aren't files and do not rely on trackers. The link includes all the information needed to locate the pieces of the file you want to download. Because of this, magnet links are extremely long.
A magnet link always begins with the prefix magnet:, followed by a cryptographic hash of the exact filename, a display name, several possible tracker locations, and downloads sources for the file pointed to by the Magnet link.
Aside from the problem with out-of-date trackers, Magnet links are considered superior to torrents because they do not require users to download a potentially suspect torrent file to their computers. They also do not rely on a tracker as a central authority. Magnet links are considerably easier to share and can even be pasted into a standard SMS message.
Downloading files using a magnet link couldn't be simpler! Make sure you have a torrent client such as Transmission, qbittorrent, or uTorrent installed on your PC, and just click on the link. Because of its "magnet:" prefix, your client will start downloading immediately.
Because of their advantages, Magnet links are becoming more popular than torrent files to distribute large files. Whether you share files using torrents or Magnet, you should only use peer-to-peer networks for legal purposes—such as sharing Linux distros or other open source software.
David is a freelance writer with a background in print journalism. He has written for newspapers in the United Kingdom and the Middle East. He is a terrible guitar player, and he spends his free time touring the British Isles, off-grid, with his caravan and dog. Occasionally, he writes books. No-one likes them.
Join our newsletter for tech tips, reviews, free ebooks, and exclusive deals!