In this guide, you will find:
- How to Install wget on Debian 12
- How to Use wget on Debian 12
- Bonus Method: How to Install wget2 on Debian 12
By default, wget is installed in Debian 12, however, in case you removed this utility accidentally from your system, run the following command to reinstall it:
You can use wget on Debian 12 to perform downloading in different ways, some of which are provided below:
- Downloading a File
- Downloading a File at Specific Location
- Downloading a File with a Specific Name
- Downloading a File with a Limit Rate
- Downloading a File After Interruption
- Downloading Multiple Files
You can download any file from the internet on Debian 12 right from the terminal using the wget command. You only have to add a URL of a file after the wget command from the following syntax:
By default, the wget utility downloads the file in a default user location, however, you can specify the location according to your choice by adding -P flag. You have to add the flag right after the wget command then add the directory location where you want your file to be saved. Then add the URL of a file you want to download.
Here, in the below-given command, I am downloading the Discord deb file in the Downloads directory:
You can also specify the file name besides downloading it with the default name, this can be done by adding -O flag then specify the file name followed by the URL of a file that you want to download.
Here the below-given common downloads the Discord file with the name discord-latest on Debian:
You can also change the limit rate for downloading a file on Debian 12 using the wget command. This can be done by adding the –limit-rate keyword, followed by the limit rate in MBs then add URL to begin downloading the file on Debian:
Here, the following command will download the Discord file on Debian 12 with a limit rate of 1.5 MB:
You can also download the file from where it is stopped due to an interruption using the wget command. This can be done by adding the -c flag followed by the URL to download that specific file on Debian:
You can also use the wget command on Debian 12 to download multiple files simultaneously from the Internet. You can do this process using the steps given below:
Step 1: First create a text file using nano editor on Debian 12:
Step 2: Then add the URLs of the files you want to download by ensuring each line of the text file consists of one URL:
Step 3: Now save the text file using CTRL+X, add Y and press Enter to exit.
Step 4: Then use the wget command with -i flag followed by the file name that includes multiple URLs:
This will begin downloading multiple files on your Debian system.
wget2 is an upgraded version of wget that perform fast downloading and include features like HTTP/2 support, improved compression handling and more. Since it is currently in development mode, it isn’t pre-installed in Linux systems, including Debian 12. However, if you want to try it, you can install wget2 on Debian 12 from the following command:
Then use the following command to confirm wget2 version on Debian:
Note: The process to download files using wget2 command is similar to wget command. You only have to replace wget with wget2 in the commands provided in the above section of this guide.
wget is a powerful command-line utility for downloading files from the Internet on terminal. It is preinstalled in Linux systems including Debian 12, however, if uninstalled by mistake, you can install it from the apt install command. In this guide, we have covered in detail the installation and the use of wget command on Debian 12. Following this guide, you will be able to download files with default name, with specific name, redownload the file after interruption and download multiple files simultaneously on Debian 12.