Image

Knowledge base → Downloading files in the Linux console using wget

[Virtual servers] [Shared hosting]
Date of publication: 29.03.2024

To download a file in the Linux console, we recommend using the wget utility. It is available by default in both virtual servers and shared hosting.

Please note that in case of shared hosting, access via ssh is only possible on the Business and Business + tariffs.

If the package is missing, install it:

apt install wget

or (for Rocky & Alma)

yum install wget

1. Here are examples of use

1.1 Downloading a file

wget https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/debian-12.5.0-amd64-DVD-1.iso

1.2 Downloading a file with a speed limit

wget --limit-rate=500K https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/debian-12.5.0-amd64-DVD-1.iso

1.3 Background file download

wget -b https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/debian-12.5.0-amd64-DVD-1.iso

1.4 Resuming file downloading if interrupted

wget -c https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/debian-12.5.0-amd64-DVD-1.iso

1.5 Downloading files with a choice of connection type IPv4 or IPv6

For IPv4:

wget -4 https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/debian-12.5.0-amd64-DVD-1.iso

For IPv6:

wget -6 https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/debian-12.5.0-amd64-DVD-1.iso

1.6 Downloading by specifying a folder

wget -P /home/user https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/debian-12.5.0-amd64-DVD-1.iso

1.7 Downloading multiple files

1.7.1 Create a file with links

files.txt
https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/debian-12.5.0-amd64-DVD-1.iso
https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/debian-12.5.0-arm64-netinst.iso

1.7.2 Command format for downloading multiple files

wget -i files.txt

1.8 Downloading with authorization via FTP protocol

wget --ftp-user=FTP_USER --ftp-password=FTP_PASSWORD ftp://domain.tld/filename.tar.gz

1.9 Download via https, ignoring certificate verification

wget --no-check-certificate https://domain-with-invalid-ssl.tld/some-file-name.zip




No Comments Yet