×

How to Install wget on Debian 12? – LinuxWays

How to Install wget on Debian 12? – LinuxWays


Wget is a command-line utility that allows you to download files from the internet. It supports various protocols, such as HTTP, HTTPS, FTP, and SFTP. Wget can also resume interrupted downloads, follow links, and handle authentication. Wget is pre-installed in most Linux distributions including Debian 12.

This article will describe how to install wget on Debian 12 (Bookworm) distribution.

How to Install wget on Debian 12?

The below-listed methods are used to install wget on Debian 12 Systems:

  • Method 1: Installing wget Using the apt Package Manager
  • Method 2: Installing wget Using dpkg Package Manager

Method 1: Installing wget Using the apt Package Manager

The “wget” can be installed using the “apt” official package manager by the following steps:

Step 1: Launch Terminal

The terminal can be launched either by using the shortcut “Ctrl+Alt+T” or by using the Application Launcher:

The following screenshot shows how the Terminal looks like on Debian 12:

Step 2: Update System Repositories

We will update the apt repository before installing any new software with sudo privileges to avoid dependency issues by running the following command:

Step 3: Install wget

After updating the apt repositories, we will install wget by running the following command:

Step 3: Verify Installation

We can verify the wget installation by checking the version by running the following command:

Method 2: Installing wget Using dpkg Package Manager

The “wget” can be installed using dpkg package manager by running the following steps:

Step 1: Download .deb file

We can download the Debian file from the official website by selecting the file “wget_1.21.3-1ubuntu1_amd64.deb” as below:

This will start the download process and the .deb file will be downloaded in the Downloads folder by default:

We will launch the terminal (as shown in Step 1 of Method 1) and we will navigate to the .deb file using the “cd” command as shown below:

Step 2: Install wget

We can install wget by running the following command:

$ sudo dpkg -i wget_1.21.3-1ubuntu1_amd64.deb

This will conclude the installation.

Step 3: Verifying installation

We can verify the installation by checking the version of the wget as shown below:

How to Uninstall wget on Debian 12?

If in case, we need to uninstall wget from our system, we will run the following command:

Press Y at the prompt to continue with the uninstallation process.

It can be observed that the uninstallation is successful.

Further, we can verify if the uninstallation is done successfully, by checking the version:

As we cannot see the version information by running the version command, this signifies that we have successfully uninstalled wget.

Conclusion

To install wget on Debian 12, you need to follow these steps: update your system with “sudo apt update”. Install wget with the “sudo apt install wget” command. Finally, verify the installation with the “wget –version” command. This article has discussed in detail how to install wget on Debian 12 (Bookworm) systems using the official “apt” and dpkg package manager.



Source link