Invoke-WebRequest -Uri $url -OutFile $dest
You don’t need to enter the full path, but a file name is required.
To download a file we need to know the source URL and give up a destination for the file that we want to download. For this, we will be using the Invoke-WebRequest cmdlet. We are going to start with the most common way to download a file from an URL with PowerShell. In this article, we are going to start with the most straightforward method to download a single file and we are also going to take a look at other (faster) methods to download a file with PowerShell. We can download files from any URL with PowerShell, local network shares, and from behind credential protected websites. There are a couple of methods when it comes to downloading files with PowerShell. But did you know that you can also download a file with PowerShell? You can use PowerShell to download single or multiple files from the internet.
If you having difficulties grabbing files over the internet, aria2 is a good download utility.PowerShell is a great scripting language to write all kinds of scripts. Like Curl, aria2 supports a number of protocols that make it better. Wget still remains in memory for everyone and the default utility in most Linux distributions.
To download a torrent file, run the command using the torrent link as shown: $ aria2c Download a torrent fileįinally, for more command options, visit the man pages as shown: $ man aria2c Conclusion To avoid this scenario, you can limit the bandwidth using the -max-download-limit option a shown: $ aria2 -max-download-limit=500k 6) Download a Torrent file This can result to degraded performance if you intend to upload or download files using other applications. To download a file using either HTTP, HTTPS or FTP protocol, use the syntax: $ aria2c file-urlįor example, to download the latest WordPress tarball file, run the command: $ aria2c Īria2c download files saved in a text file 5) Limit download bandwidth speedīy default, aria2 uses the maximum bandwidth to download files. 1) Download a single file over the internet In this section, we look at a few usages of the Aria2 command-line tool.
$ sudo yum install aria2 Fedora 22 and later versionsįor Fedora 22, use the dnf package manager just as in RHEL 8/ CentOS 8 $ sudo dnf install aria2 Arch / Manjaro Linuxįor Arch Linux & its derivatives use the Pacman package manager as shown: $ sudo pacman -S aria2 How to use Aria2 with example On Ubuntu, use the APT package manager as follows: $ sudo apt install aria2 RHEL 8/CentOS 8įor RHEL 8 /CentOS 8, use the dnf package manager as shown: $ sudo dnf install aria2įor RHEL 7/CentOS 7 and earlier versions, use the yum package manager. To install Aria2 using snap, run the command below: $ sudo snap install aria2cĪpart from using snap packages, you can use the package managers in various Linux distributions as follows Ubuntu/Debian/Mint This is the most recommended way of installing Aria2 on various Linux distros for the simple reason that snap packages are universal and work in almost any major Linux flavor.īefore anything else, ensure that snapd is installed.
Physical memory usage is roughly 4MB for normal FTP/HTTP downloads ad 9MB for BitTorrent downloads.Ģ) Multi-Connection Download: Aria2 is a multi-protocol download tool that supports multiple protocols and tries as much as possible to use maximum bandwidth to speed up your downloadsģ) Remote Control: Aria2 has support for RPC interface, more specifically JSON-RPC and XML-RPC.Ĥ) Fully-featured BitTorrent features: These include Web seeding, Magnet URI, Encryption, Selective downloads and Local Peer discovery to mention a few.ĥ) Metalink support: Installing Aria2 on Linuxīefore we touch base on how Aria2 works, let see how to install it on various Linux distributions: Install Aria2 using Snap Key Featuresīelow is a highlight of the key features of Aria2 download utility:ġ) Resource-friendly: Aria2 is quite lightweight and takes up just a small fraction of your RAM and CPU. In this guide, you will learn how to install and use Aria2 on Linux. Aria2 works on windows, Linux, and Mac OSX. It supports a variety of protocols such as HTTP, HTTPS, FTP, and even BitTorrent.
Aria2 is a free and open-source lightweight multi-protocol command-line utility that grabs files from the internet.