Wget is a free GNU command-line software that is used to download the data and files from the web servers (Internet). It is a part of the GNU Project. It uses the HTTP, HTTPS, and FTP protocols to download the contents and data. If the download fails due to certain problem, it resumes the file where it was left.
GNU wget works as a tool that helps you to manage weak and unreliable network connections. It allows you to resume downloads, download multiple files, perform recurring downloads, limit bandwidth, mirror a website, download in the background, and more.
Features of the GNU Wget
How to check whether the GNU wget package is installed or not?
Mostly, the "wget package" comes pre-installed on the Linux Operating System.
Step 1: Open the terminal window.
Step 2: Then, type "wget".
If your system have installed "wget package" , the output tells you that the wget command is missing a URL, as shown in the screenshot below.
If your system do not have the "wget package" installed, you will have to manually download and install the wget package.
Installation process of the GNU wget for Linux operating system
To install the wget package on the Linux operating system, use this command:
Installation process of the GNU wget for CentOS/Fedora operating system
To install the wget package on the CentOS/Fedora operating system, use this command:
Installation process of the GNU wget for windows operating system
Follow these steps to install the wget package on Windows OS.
Step 1: Click the following link to download the GNU wget exe file (https://eternallybored.org/misc/wget/)
Step 2: Download the exe file according to your window.
Step 3: Copy the exe file and paste it from this path (C:\Windows\System32).
Step 4: Open the CMD and start running wget commands.
Syntax of the wget command:
The wget syntax has the following pattern:
1. Download a file
2. Download a file with specific name
This command allows you to change the file name before downloading the file to your system. The syntax of this command is:
3. Download a file to the specific location
GNU wget downloads the file to the user directory by default. If the user saves the file to a specific location, add the -P option. The syntax of this command is:
4. Download Multiple Files
If you want to download multiple files at once, add the -i option.
The syntax of this command is:
Step 1: To download the multiple files, you will need to create a text file and place all the URLs in the text file that you want to download. Each URL must be on a separate line.
Step 2: Save the text file.
5. Set download speed according to the user
The user can set the download speed of a file. The download speed of the file is defined in mb (m) and kb (k). The syntax of this command is:
6. Download a large file in the background
If the user wants to download the large file in the background, add the -b option. The syntax of this command is:
7. Continue download after interrupt
If you are downloading a big file and it fails in any way, you can continue the download the file using the "-c" option in most situations. The syntax of this command is: