How to Install wget on Linux (Ubuntu, CentOS, RHEL, Fedora)

wget is a popular command-line utility for downloading files from the internet. It supports various protocols such as HTTP, HTTPS, and FTP, and is widely used for downloading files, mirroring websites, and automating downloads in scripts.

In this short guide, we will demonstrate how to install wget on different Linux distributions. By following these steps, you will be able to use wget for downloading files on your Linux system.

Step 1: Install wget on Debian-based Systems (e.g., Ubuntu)

For Debian-based systems, such as Ubuntu and Debian, you can install wget using the apt package manager. First, open a terminal and update the package list by running:

sudo apt update

Next, install the wget package with the following command:

sudo apt install wget

Step 2: Install wget on Red Hat-based Systems (e.g., CentOS, RHEL, Fedora)

For Red Hat-based systems, such as CentOS, RHEL, and Fedora, you can install wget using either the yum or dnf package manager, depending on your distribution.

See also  How to Install Apache Httpd Web Server on Linux

For CentOS and RHEL, open a terminal and run:

sudo yum install wget

For Fedora, run:

sudo dnf install wget

Step 3: Verify wget Installation

After installing wget, verify that it is correctly installed by checking its version. Run the following command in the terminal:

wget --version

If the installation was successful, you will see the version number and other information about the wget installation.

Commands and Their Functions:

  • sudo apt update – Updates the package list on Debian-based systems.
  • sudo apt install wget – Installs the wget package on Debian-based systems.
  • sudo yum install wget – Installs the wget package on CentOS and RHEL.
  • sudo dnf install wget – Installs the wget package on Fedora.
  • wget –version – Checks the installed version of wget.
See also  How to Install CLion on Ubuntu

Conclusion

In this guide, we have demonstrated how to install wget on different Linux distributions, including Debian-based systems (e.g., Ubuntu) and Red Hat-based systems (e.g., CentOS, RHEL, Fedora). With wget installed on your Linux system, you can now use it to download files, mirror websites, and automate downloads in scripts.

Please feel free to leave comments and suggest improvements to this guide. Your feedback is valuable and helps us improve our content for our audience.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *