Introduction – GNU/wget is a free and open source software package for getting files using HTTP, HTTPS, and FTP Internet protocols. The GNU/wget might not be installed on your CentOS 8 based desktop or server. For example, if you try to use the wget command on CentOS 8, you will get an error that read as follows:
bash: wget: command not found
This page explains how to set up wget on CentOS 8 using yum command/dnf command.
How to install wget on CentOS 8
The procedure to install wget command is as follows on CentOS Linux 8:
- Open a terminal window.
- Search for wget package on CentOS Enterprise Linux 8, run:
sudo yum search wget - Run to install wget :
sudo yum install wget - Verify wget installation, run:
wget https://www.cyberciti.biz/files/hello-linux-module.zip - Check wget version by running:
wget --version
Let us see all commands and steps in details to install wget in CentOS 8.
Installing wget command on CentOS 8
First try to locate wget package, run:
$ sudo yum search wget
Sample outputs:
==================================== Name Exactly Matched: wget ===================================== wget.x86_64 : A utility for retrieving files using the HTTP or FTP protocols
Type the following yum command or dnf command
$ sudo dnf install wget
OR
$ sudo yum install wget
How to test wget command
Now you know how to install wget on CentOS 8. It is time to learn how to use it. The syntax is:
wget url
wget https://exampleDotCom/fileName
wget http://url/path.tar.gz
wget [options] urls
How to download a single file using wget
Run the following command:
$ wget https://www.cyberciti.biz/files/tw_cli.8.html
$ wget ftp://ftp.freebsd.org/pub/sys.tar.gz
$ wget -O output.file https://www.cyberciti.biz/files/tw_cli.8.html
You can limit download speed as well:
wget --limit-rate=50k url
It is possible to set username and password while downloading files from password protected area:
wget --http-user=vivek --http-password=Secrete https://url-domain/file.tar.gz
For more info see “Linux wget: Your Ultimate Command Line Downloader”
How to resume broken downloads with wget
Again the syntax is as follows:
wget -c url
wget --continue url
wget --continue [options] url
Conclusion
This page explained how to install the wget command using the dnf command or yum command. Further, it also demonstrated basic usage of the wget for command line user. For more info see GNU/wget homepage here.
🐧 Get the latest tutorials on Linux, Open Source & DevOps via:
- RSS feed or Weekly email newsletter
- Share on Twitter • Facebook • 1 comment... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
Comments on this entry are closed.
Got a comment/suggestion for this page? Need further help? Try our forum thread.