wget is Linux command line utility. wget is widely used for downloading files from Linux command line. There are many options available to download a file from remote server. wget works same as open url in browser window.
Tip 1: Download File using Wget
Below example will download file from server to current local directory.
$ wget https://tecadmin.net/file.zip
Tip 2: Download File & Save to Specific Location
Below command will download zip file in /opt folder with name file.zip. -O is used for specify destination folder
# wget https://tecadmin.net/file.zip -O /opt/file.zip
Tip 3: Download File from FTP
Some time you required to download file from ftp server, so wget can easily download file from ftp url like below.
# wget ftp://ftp.tecadmin.net/file.zip
Tip 4: Download File from Password Protected URLs
Sometimes we required to specify username and password to download a file. While using browser its easy but using command line it doesn’t prompt for login credentials. Below examples will show to how to use username,password while downloading files from password protected sources.
Tip 4.1: Download file from Password protected ftp server.
$ wget --ftp-user=username --ftp-password=secretpassword ftp://ftp.tecadmin.net/file.zip or $ wget ftp://username:[email protected]/file.zip
Tip 4.2: Download file from password protected http server.
# wget --http-user=username --http-password=secretpassword https://tecadmin.net/file.zip or # wget --user=username --password=secretpassword https://tecadmin.net/file.zip
Tip 4.3: Download file behind password protected proxy server.
$ wget --proxy-user=username --proxy-password=secretpassword https://tecadmin.net/file.zip
Tip 5: Download File from Untrusted Secure URL.
If any download url is using untrusted ssl certificate, wget will not download that file. But we can download it by using –no-check-certificate parameter in url.
$ wget https://tecadmin.net/file.zip --no-check-certificate
2 Comments
I am intrigued and enthusiastic about what you are writing about the following.
I will be interested along with thinking about what you’re writing about here.