wget command in Linux is basically a utility that is used for downloading files from a web server. Using this command, the users can download various files from their chosen networks using protocols like HTTP, HTTPS, and FTP.

With the usage of wget command in Linux, user can play with different options like downloading multiple files, resuming downloads, limiting bandwidth, recursive downloads, running downloads in background, and many more. So, in this article we are to discuss how this command can be used and how a Linux user can play with downloads using command line.

Syntax of wget command in Linux
wget [option] [URL]
How to install wget in system?
Although the wget package is pre-installed on most of the Linux distributions in modern era, still if you find the package is not installed on your device, you can install it manually.

In order to check if wget package is installed, just open terminal and run the command below:

wget
In case if running the command shows wget:missing URL, it means the package is already installed. Otherwise, wget command not found, will be displayed.

Install wget on Ubuntu/Debian systems
sudo apt install wget
Install wget on CentOS/Fedora
sudo yum install wget
Options available to use with wget:
-v | –version: Displays version of wget package.
-h | –help: Displays help instructions on screen with all possible options.
-o logfile | –output-file=logfile: Used for directing all messages to a specified log file. If the file is not specified, the logs are stored on default log file. The messages are generally reported to standard error.
-b | –background: Using this option, the download process is sent to run in background as soon as the process starts. In case if no file is specified using -o, the output is directed to wget-log by default.
-a: Used for appending log file. This option is probably similar to -o, however it appends just the logfile instead of overwriting the old log file. In case if there’s no log file exist, a new file is created.
-i: Used to specify a file from which wget reads the URL.
-t number | -tries=number: Used to set a specified number of tries. 0 or inf can be specified to retry at infinity. The default number of retry is 20 times.
-c: Used for resuming a partially downloaded file if the resume capability of file is yes.
-w: This option is used to set the system to wait for the specified number of seconds between retrieving the next data packet. With the help of this, the server load can be lightened as it use to make requests less frequently.
-r: This option is technically a recursive call to a specified link in command line. Using this, it keeps recursively retrieving the link specified, even in case of fatal errors.

Using wget Command In Linux- Command Line Downloader
1.20 GEEK