When working remotely and even domestically, you typically could must acquire content material from an exterior supply. To get such content material, particularly if you don’t have another choices, it would be best to use command line instruments to get the job accomplished.
On this article, we’re going to assessment among the most generally used instruments for downloading content material through the command line.
Learn Additionally: 9 Most Common GUI Obtain Managers for Linux
We’re going to begin with one of the in style instruments known as wget. It’s a community utility that can be utilized to obtain content material over HTTP, HTTPS and FTP. Wget can be utilized in each background and foreground, which makes it helpful if you have to go away a obtain operating, even when you’re logged off.
This software comes with loads of choices, that permit you to do an authenticated downloads, recursive downloads with degree limits, accepts common expressions for URLs, permits excludes, accepts URL inputs from a file and lots of others. The choices for wget are actually quite a bit and it’s extremely really helpful to assessment the software’s assist web page by merely operating.
$ wget -h
Some helpful examples of wget command are:
Essentially the most fundamental obtain instance of wget is:
$ wget https://wordpress.org/newest.zip
Instance of downloading from URLs listed in a file. First right here is the checklist of our file:
$ cat checklist.txt
Then you may run the obtain with:
$ wget -i checklist.txt
To run a obtain in a background you should use:
$ wget -b https://wordpress.org/newest.zip
If you wish to use wget with FTP to obtain a single file.
$ wget ftp://person:[email protected]:/path-to-file/file.txt
A extra helpful instance of this could be to make use of background and recursive mode so you may acquire all information and folders inside a listing.
$ wget -br ftp://person:[email protected]:/path-for-download/
Wget is preinstalled on most of the trendy Linux distros, but when you have to set up it, you should use:
$ sudo apt set up wget # Debian/Ubuntu like distros
# yum set up wget # CentOS/RHEL
# dnf set up wget # Fedora
A curl is a software that can be utilized to switch knowledge from or to a server. It helps a number of protocols. In accordance with its man web page, the next protocols are supported DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET, and TFTP.
As you may think about, you are able to do quite a bit with these. As you in all probability figured it out, curl helps proxies, person authentication, FTP add/obtain, file switch resume and lots of many extra.
Listed below are some examples of utilizing curl:
Obtain a file:
$ curl -O https://wordpress.org/newest.zip
Obtain a file to output file by your alternative:
$ curl -o wordpress.zip https://wordpress.org/newest.zip
To renew an interrupted obtain you should use:
$ curl -C – O https://wordpress.org/newest.zip
You possibly can verify extra helpful curl examples right here: 15 Recommendations on use curl in Linux.
To put in curl, you should use:
$ sudo apt set up curl # Debian/Ubuntu
# yum set up curl # CentOS/RHEL
# dnf set up curl # Fedora
Aria is one other multi-protocol obtain software. Aria helps HTTP/HTTPS, FTP/SFTP BitTorrent and Metalink. Among the options that make it completely different in comparison with others are that it helps the obtain of information from a number of places on the identical time, magnet hyperlinks and is absolutely featured BitTorrent shopper.
As a BitTorrent shopper, it helps DHT, PEX, encryption, Magnet URI, internet seeding, selective downloads, and native peer discovery.
Be at liberty to assessment the Aria2 obtain supervisor article for extra detailed utilization. Under you may see few examples of aria2 fundamental utilization
Listed below are some examples of utilizing Aria2
Obtain a torrent file:
$ aria2c http://releases.ubuntu.com/18.10/ubuntu-18.10-desktop-amd64.iso.torrent
Obtain, utilizing URLs listed in a textual content file:
$ aria2c -i downloadurls.txt
Resume incomplete obtain:
$ aria2c -c http://releases.ubuntu.com/18.10/ubuntu-18.10-desktop-amd64.iso.torrent
Obtain from password protected web site:
$ aria2c –http-user=xxx –http-password=xxx https://protectedwebsite.com/file
To put in Aria2, you should use the next instructions:
$ sudo apt set up aria2 # Debian/Ubuntu
# yum set up aria2 # CentOS/RHEL
# dnf set up aria2 # Fedora
The fourth obtain utility in our checklist is Axel, makes an attempt to enhance the downloading course of through the use of a number of connections for one file. It might probably use a number of obtain places for one obtain. In accordance with the builders, Axel can improve the obtain velocity of your downloads by 60% and it helps protocols: HTTP/HTTPS, FTP, and FTPS.
We now have reviewed Axel in a separate article, which yow will discover right here: How you can use Axel as obtain accelerator to hurry up FTP and HTTP downloads in Linux.
Within the above article, you may verify some obtain time comparisons between wget, HTTP obtain, and Axel.
Listed below are some examples of utilizing Axel:
To carry out a easy obtain with Axel, you should use the next command:
$ axel https://wordpress.org/newest.zip
You possibly can set most obtain velocity with the corresponding choice –max-speed or brief choice -s. The worth is about in bytes per second:
$ axel –max-speed=512000 https://wordpress.org/newest.zip
To avoid wasting the file with completely different identify, you should use the -o choice to specify the file identify:
$ axel -o wordpress.zip https://wordpress.org/newest.zip
If you wish to set up Axel in your Linux system use the suitable from the instructions beneath:
$ sudo apt set up axel # Ubuntu/Debian
# yum set up epel launch && yum set up axel # CentOS/RHEL
# dnf set up axel # Fedora
This was our checklist of among the most generally used obtain utilities in Linux. Which of them do you employ? Why do you like these? Share your opinion within the remark part beneath.